improve redirection after resetting a password

This commit is contained in:
Filip Gralinski 2017-02-18 11:32:48 +01:00
parent ea1e13ead6
commit 332d520eee
2 changed files with 2 additions and 4 deletions

View File

@ -101,9 +101,8 @@ doResetPassword' :: Bool -> Text -> Key User -> Text -> Handler Html
doResetPassword' True _ userId password = do
updatePassword userId (Just password)
runDB $ update userId removeVerificationKeyStatement
defaultLayout $ do
setTitle "Reset password"
$(widgetFile "password-reset")
setMessage $ toHtml ("Password set! You can log in now." :: Text)
redirect HomeR
doResetPassword' False key _ _ = do
tooWeakPasswordMessage

View File

@ -1 +0,0 @@
<p>OK, the password has been changed.