changed user id to be their email
This commit is contained in:
parent
8b1c3f090b
commit
64d7e07f35
@ -67,7 +67,7 @@ instance UserData (Entity User) (Map Text Text) where
|
||||
data Scope (Entity User) = ID | Profile deriving (Show, Read, Eq)
|
||||
readScope = read
|
||||
showScope = show
|
||||
userScope (Entity uID _) ID = M.singleton "id" . T.pack $ show uID
|
||||
userScope (Entity _ User{..}) ID = M.singleton "id" userEmail
|
||||
userScope (Entity _ User{..}) Profile = M.fromList [("name", userName), ("email", userEmail)]
|
||||
lookupUser email _ = runDB $ do
|
||||
user <- selectList [UserEmail ==. email] []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user