Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newUser :: (CmdM env err m, MonadRandom m, HasNodeError err, HasMail env) => EmailAddress -> m UserId
- newUsers :: (CmdM env err m, MonadRandom m, HasNodeError err, HasMail env) => NonEmpty EmailAddress -> m (NonEmpty UserId)
- guessUserName :: Text -> Maybe (Text, Text)
- new_user :: HasNodeError err => NewUser GargPassword -> DBCmd err UserId
- mkNewUser :: EmailAddress -> GargPassword -> NewUser GargPassword
Creating users
newUser :: (CmdM env err m, MonadRandom m, HasNodeError err, HasMail env) => EmailAddress -> m UserId #
Creates a new User
from the input EmailAddress
, which needs to
be valid (i.e. a valid username needs to be inferred via guessUsername
).
newUsers :: (CmdM env err m, MonadRandom m, HasNodeError err, HasMail env) => NonEmpty EmailAddress -> m (NonEmpty UserId) #
Helper functions
guessUserName :: Text -> Maybe (Text, Text) #
guessUserName guess username and normalize it (Text.toLower)
Internal types and functions for testing
new_user :: HasNodeError err => NewUser GargPassword -> DBCmd err UserId #
A DB-specific action to create a single user.
This is an internal function and as such it doesn't send out any email
notification, and thus lives in the DbCmd
effect stack. You may want to
use newUser
instead for standard Gargantext code.
mkNewUser :: EmailAddress -> GargPassword -> NewUser GargPassword #