Upgrade to latest yesod-auth-account

This commit is contained in:
fr33domlover 2018-04-01 01:29:50 +00:00
parent c2785c8e47
commit 282ed32fe6
4 changed files with 10 additions and 7 deletions

View file

@ -387,8 +387,8 @@ instance YesodPersistRunner App where
instance YesodMailSend App where instance YesodMailSend App where
data MailMessage App data MailMessage App
= MailVerifyAccount Text = MailVerifyAccount (Route App)
| MailResetPassphrase Text | MailResetPassphrase (Route App)
formatMailMessage _reply _mname msg = formatMailMessage _reply _mname msg =
case msg of case msg of
MailVerifyAccount url -> MailVerifyAccount url ->
@ -472,19 +472,21 @@ instance AccountSendEmail App where
sent <- sendMail (Address (Just uname) email) (MailVerifyAccount url) sent <- sendMail (Address (Just uname) email) (MailVerifyAccount url)
unless sent $ do unless sent $ do
setMessage "Mail sending disabed, please contact admin" setMessage "Mail sending disabed, please contact admin"
ur <- getUrlRender
$logWarn $ T.concat $logWarn $ T.concat
[ "Verification email NOT SENT for user " [ "Verification email NOT SENT for user "
, uname, " <", emailText email, ">: " , uname, " <", emailText email, ">: "
, url , ur url
] ]
sendNewPasswordEmail uname email url = do sendNewPasswordEmail uname email url = do
sent <- sendMail (Address (Just uname) email) (MailResetPassphrase url) sent <- sendMail (Address (Just uname) email) (MailResetPassphrase url)
unless sent $ do unless sent $ do
setMessage "Mail sending disabed, please contact admin" setMessage "Mail sending disabed, please contact admin"
ur <- getUrlRender
$logWarn $ T.concat $logWarn $ T.concat
["Password reset email NOT SENT for user " ["Password reset email NOT SENT for user "
, uname, " <", emailText email, ">: " , uname, " <", emailText email, ">: "
, url , ur url
] ]
instance YesodAuthVerify App where instance YesodAuthVerify App where

View file

@ -18,7 +18,7 @@ packages:
# - '../yesod-auth-account' # - '../yesod-auth-account'
- location: - location:
git: https://dev.seek-together.space/s/fr33domlover/r/yesod-auth-account git: https://dev.seek-together.space/s/fr33domlover/r/yesod-auth-account
commit: 1bd49ddf91521bbfeb811af430d0e6918276d127 commit: 31f8467d598d06d06d43917f42c035e53c2f3b46
extra-dep: true extra-dep: true
- '../yesod-mail-send' - '../yesod-mail-send'
@ -36,6 +36,7 @@ extra-deps:
# for text drawing with 'diagrams' # for text drawing with 'diagrams'
- SVGFonts-1.5.0.1 - SVGFonts-1.5.0.1
- tagged-0.8.5 - tagged-0.8.5
- time-interval-0.1.1
- transformers-0.4.3.0 - transformers-0.4.3.0
- transformers-compat-0.5.1.4 - transformers-compat-0.5.1.4
# remove once I use lenses instead # remove once I use lenses instead

View file

@ -1,4 +1,4 @@
Visit the following link to reset your passphrase on the Vervis instance at Visit the following link to reset your passphrase on the Vervis instance at
<@{HomeR}>: <@{HomeR}>:
<#{url}> <@{url}>

View file

@ -1,4 +1,4 @@
Visit the following link to verify your account on the Vervis instance at Visit the following link to verify your account on the Vervis instance at
<@{HomeR}>: <@{HomeR}>:
<#{url}> <@{url}>