From 282ed32fe6711455b1af9ce86d6375e2df6e1a68 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sun, 1 Apr 2018 01:29:50 +0000 Subject: [PATCH] Upgrade to latest yesod-auth-account --- src/Vervis/Foundation.hs | 10 ++++++---- stack.yaml | 3 ++- templates/person/email/reset-passphrase.md | 2 +- templates/person/email/verify-account.md | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index a3b1e3a..be70e82 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -387,8 +387,8 @@ instance YesodPersistRunner App where instance YesodMailSend App where data MailMessage App - = MailVerifyAccount Text - | MailResetPassphrase Text + = MailVerifyAccount (Route App) + | MailResetPassphrase (Route App) formatMailMessage _reply _mname msg = case msg of MailVerifyAccount url -> @@ -472,19 +472,21 @@ instance AccountSendEmail App where sent <- sendMail (Address (Just uname) email) (MailVerifyAccount url) unless sent $ do setMessage "Mail sending disabed, please contact admin" + ur <- getUrlRender $logWarn $ T.concat [ "Verification email NOT SENT for user " , uname, " <", emailText email, ">: " - , url + , ur url ] sendNewPasswordEmail uname email url = do sent <- sendMail (Address (Just uname) email) (MailResetPassphrase url) unless sent $ do setMessage "Mail sending disabed, please contact admin" + ur <- getUrlRender $logWarn $ T.concat ["Password reset email NOT SENT for user " , uname, " <", emailText email, ">: " - , url + , ur url ] instance YesodAuthVerify App where diff --git a/stack.yaml b/stack.yaml index 4479608..6024e8e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -18,7 +18,7 @@ packages: # - '../yesod-auth-account' - location: git: https://dev.seek-together.space/s/fr33domlover/r/yesod-auth-account - commit: 1bd49ddf91521bbfeb811af430d0e6918276d127 + commit: 31f8467d598d06d06d43917f42c035e53c2f3b46 extra-dep: true - '../yesod-mail-send' @@ -36,6 +36,7 @@ extra-deps: # for text drawing with 'diagrams' - SVGFonts-1.5.0.1 - tagged-0.8.5 + - time-interval-0.1.1 - transformers-0.4.3.0 - transformers-compat-0.5.1.4 # remove once I use lenses instead diff --git a/templates/person/email/reset-passphrase.md b/templates/person/email/reset-passphrase.md index fb1ccd4..21e9d21 100644 --- a/templates/person/email/reset-passphrase.md +++ b/templates/person/email/reset-passphrase.md @@ -1,4 +1,4 @@ Visit the following link to reset your passphrase on the Vervis instance at <@{HomeR}>: -<#{url}> +<@{url}> diff --git a/templates/person/email/verify-account.md b/templates/person/email/verify-account.md index 1373654..f3f529a 100644 --- a/templates/person/email/verify-account.md +++ b/templates/person/email/verify-account.md @@ -1,4 +1,4 @@ Visit the following link to verify your account on the Vervis instance at <@{HomeR}>: -<#{url}> +<@{url}>