From 47b0cdfc2f27db764547cc758c3ef62d8cf091aa Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Tue, 15 May 2018 23:54:12 +0000 Subject: [PATCH] Implement forgotten loadUserByEmailAddress (thanks ultrason) --- src/Vervis/Foundation.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index c9bc67c..90256ae 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -445,7 +445,8 @@ morphAPDB = AccountPersistDB' . runAccountPersistDB instance AccountDB AccountPersistDB' where type UserAccount AccountPersistDB' = Entity Person - loadUser = morphAPDB . loadUser + loadUser = morphAPDB . loadUser + loadUserByEmailAddress = morphAPDB . loadUserByEmailAddress addNewUser name email key pwd = AccountPersistDB' $ runDB $ do now <- liftIO getCurrentTime @@ -465,10 +466,10 @@ instance AccountDB AccountPersistDB' where pid <- insert person return $ Right $ Entity pid person - verifyAccount = morphAPDB . verifyAccount - setVerifyKey = (morphAPDB .) . setVerifyKey - setNewPasswordKey = (morphAPDB .) . setNewPasswordKey - setNewPassword = (morphAPDB .) . setNewPassword + verifyAccount = morphAPDB . verifyAccount + setVerifyKey = (morphAPDB .) . setVerifyKey + setNewPasswordKey = (morphAPDB .) . setNewPasswordKey + setNewPassword = (morphAPDB .) . setNewPassword instance AccountSendEmail App where sendVerifyEmail uname email url = do