aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")