forked from filipg/gonito
setting up an account more intuitive
This commit is contained in:
parent
e3a3f28da0
commit
7a9eb28b48
@ -112,7 +112,7 @@ doResetPassword' :: Bool -> Text -> Key User -> Text -> Handler Html
|
||||
doResetPassword' True _ userId password = do
|
||||
updatePassword userId (Just password)
|
||||
runDB $ update userId removeVerificationKeyStatement
|
||||
setMessage $ toHtml ("Password set! You can log in now." :: Text)
|
||||
setMessage $ toHtml ("Password set! Now, you can log in with your e-mail address." :: Text)
|
||||
redirect HomeR
|
||||
|
||||
doResetPassword' False key _ _ = do
|
||||
|
@ -18,7 +18,13 @@ getHomeR = do
|
||||
let maybeLocalId = case maybeUser of
|
||||
Just user -> userLocalId $ entityVal user
|
||||
Nothing -> Nothing
|
||||
defaultLayout $ do
|
||||
if maybe False ((\u -> isNothing (userLocalId u) && isNothing (userName u)) . entityVal) maybeUser
|
||||
then
|
||||
do
|
||||
setMessage $ toHtml ("First, set up your name and/or ID!" :: Text)
|
||||
redirect $ YourAccountR
|
||||
else
|
||||
defaultLayout $ do
|
||||
aDomId <- newIdent
|
||||
setTitle "Welcome To Gonito.net!"
|
||||
$(widgetFile "homepage")
|
||||
|
Loading…
Reference in New Issue
Block a user