Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data StoredUser = StoredUser {
- id :: UserId
- name :: Name
- textStatus :: Maybe TextStatus
- pict :: Maybe Pict
- email :: Maybe EmailAddress
- emailUnvalidated :: Maybe EmailAddress
- ssoId :: Maybe UserSSOId
- accentId :: ColourId
- assets :: Maybe [Asset]
- activated :: Bool
- status :: Maybe AccountStatus
- expires :: Maybe UTCTimeMillis
- language :: Maybe Language
- country :: Maybe Country
- providerId :: Maybe ProviderId
- serviceId :: Maybe ServiceId
- handle :: Maybe Handle
- teamId :: Maybe TeamId
- managedBy :: Maybe ManagedBy
- supportedProtocols :: Maybe (Set BaseProtocolTag)
- setStoredUserName :: Name -> StoredUser -> StoredUser
- setStoredUserSupportedProtocols :: Set BaseProtocolTag -> StoredUser -> StoredUser
- setStoredUserPict :: Pict -> StoredUser -> StoredUser
- setStoredUserAssets :: [Asset] -> StoredUser -> StoredUser
- setStoredUserAccentId :: ColourId -> StoredUser -> StoredUser
- setStoredUserLocale :: Locale -> StoredUser -> StoredUser
- setStoredUserHandle :: Handle -> StoredUser -> StoredUser
- hasPendingInvitation :: StoredUser -> Bool
- mkUserFromStored :: Domain -> Locale -> StoredUser -> User
- toLocale :: Locale -> (Maybe Language, Maybe Country) -> Locale
- toIdentity :: Bool -> Maybe EmailAddress -> Maybe UserSSOId -> Maybe UserIdentity
Documentation
data StoredUser Source #
StoredUser | |
|
Instances
setStoredUserName :: Name -> StoredUser -> StoredUser Source #
setStoredUserPict :: Pict -> StoredUser -> StoredUser Source #
setStoredUserAssets :: [Asset] -> StoredUser -> StoredUser Source #
setStoredUserAccentId :: ColourId -> StoredUser -> StoredUser Source #
setStoredUserLocale :: Locale -> StoredUser -> StoredUser Source #
setStoredUserHandle :: Handle -> StoredUser -> StoredUser Source #
mkUserFromStored :: Domain -> Locale -> StoredUser -> User Source #
:: Bool | Whether the user is activated |
-> Maybe EmailAddress | |
-> Maybe UserSSOId | |
-> Maybe UserIdentity |
If the user is not activated, toIdentity
will return Nothing
as a
precaution, because elsewhere we rely on the fact that a non-empty
UserIdentity
means that the user is activated.
The reason it's just a "precaution" is that we also have an invariant that having an email or phone in the database means the user has to be activated.