|
|
|
|
|
|
Synopsis |
|
|
|
Documentation |
|
authenticate :: MonadIO m => Database -> Username -> Password -> m (Maybe UserID) |
Authenticates a user with a password. If the username and password
match an existing user, the UserID of that user is returned.
|
|
getUserID :: MonadIO m => Database -> Username -> m (Maybe UserID) |
Checks if a username exists, and gets the user id.
|
|
getUsername :: MonadIO m => Database -> UserID -> m Username |
Gets the name of a user. Fails if the user does not
exist.
|
|
getUserInfo :: MonadIO m => Database -> UserID -> m UserInfo |
Gets info about a user. Fails if the user does not
exist.
|
|
addUser :: MonadIO m => Database -> Username -> Password -> m (Maybe UserID) |
Tries to add a new user. Returns the UserID of the new
user if successful. If there is already a user with the given
username, no user is added, and Nothing is returned.
|
|
removeUser :: MonadIO m => Database -> UserID -> m () |
Removes a user from the user database.
|
|
getAllUsers :: MonadIO m => Database -> m [UserInfo] |
Gets a list of all the users.
|
|
countUsers :: MonadIO m => Database -> m Int |
Get the number of users.
|
|
username :: Attr Username String |
|
joinUser :: Expr UserID -> Query (Rel (RecCons Username (Expr Username) RecNil)) |
|
Produced by Haddock version 0.7 |