aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-05-30 19:02:34 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-05-30 19:02:34 +0200
commitc87903ca4d01382623fb1ac3ce076456c279b841 (patch)
tree832c8f77a3324e2e678cb7585e9168d4ff5c39d8
parent1052750f7337db28119cc18dbd009421c61284b8 (diff)
downloadfietsboek-c87903ca4d01382623fb1ac3ce076456c279b841.tar.gz
fietsboek-c87903ca4d01382623fb1ac3ce076456c279b841.tar.bz2
fietsboek-c87903ca4d01382623fb1ac3ce076456c279b841.zip
verification: use right mail text and subject
-rw-r--r--fietsboek/views/default.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/fietsboek/views/default.py b/fietsboek/views/default.py
index 397f9ca..b3cad40 100644
--- a/fietsboek/views/default.py
+++ b/fietsboek/views/default.py
@@ -220,7 +220,8 @@ def do_resend_verification(request: Request) -> Response:
query = models.User.query_by_email(request.params["email"])
user = request.dbsession.execute(query).scalar_one_or_none()
if user is None or user.is_verified:
- request.session.flash(request.localizer.translate(_("flash.resend_verification_email")))
+ request.session.flash(
+ request.localizer.translate(_("flash.resend_verification_email_fail")))
return HTTPFound(request.route_url("resend-verification"))
token = models.Token.generate(user, TokenType.VERIFY_EMAIL)
@@ -230,10 +231,10 @@ def do_resend_verification(request: Request) -> Response:
mail = email.prepare_message(
request.config.email_from,
user.email,
- request.localizer.translate(_("page.password_reset.email.subject")),
+ request.localizer.translate(_("email.verify_mail.subject")),
)
mail.set_content(
- request.localizer.translate(_("page.password_reset.email.body")).format(
+ request.localizer.translate(_("email.verify.text")).format(
request.route_url("use-token", uuid=token.uuid)
)
)
@@ -244,7 +245,7 @@ def do_resend_verification(request: Request) -> Response:
mail,
)
- return HTTPFound(request.route_url("password-reset"))
+ return HTTPFound(request.route_url("login"))
@view_config(route_name="use-token")