Make login status display consider unverified login

This commit is contained in:
fr33domlover 2019-01-21 22:51:19 +00:00
parent 04e26a911d
commit 4875f0b9f7
2 changed files with 10 additions and 4 deletions

View file

@ -148,7 +148,7 @@ instance Yesod App where
defaultLayout widget = do defaultLayout widget = do
master <- getYesod master <- getYesod
mmsg <- getMessage mmsg <- getMessage
mperson <- maybeAuth mperson <- maybeAuthAllowUnverified
(title, bcs) <- breadcrumbs (title, bcs) <- breadcrumbs
-- We break up the default layout into two components: -- We break up the default layout into two components:

View file

@ -12,10 +12,16 @@ $# You should have received a copy of the CC0 Public Domain Dedication along
$# with this software. If not, see $# with this software. If not, see
$# <http://creativecommons.org/publicdomain/zero/1.0/>. $# <http://creativecommons.org/publicdomain/zero/1.0/>.
$maybe Entity _pid person <- mperson $maybe (Entity _pid person, verified) <- mperson
<div> <div>
You are logged in as #{personLogin person}. $if verified
<a href=@{AuthR LogoutR}>Log out. You are logged in as #{personLogin person}.
<a href=@{AuthR LogoutR}>Log out.
$else
You are logged in as #{personLogin person} (unverified). If you haven't
received a verification link by email, you can ask to
<a href=@{ResendVerifyEmailR}>resend
it. Or <a href=@{AuthR LogoutR}>Log out.
$nothing $nothing
<div> <div>
You are not logged in. You are not logged in.