From 87a647742dfbfe71e7405d2d7696db2d3306adc9 Mon Sep 17 00:00:00 2001 From: Timshel Date: Fri, 8 Mar 2024 17:39:24 +0100 Subject: [PATCH] Small improvements around email change --- src/api/core/accounts.rs | 2 ++ src/static/templates/email/change_email.hbs | 2 +- src/static/templates/email/change_email.html.hbs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 91555a552b..b8a837a0d9 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -559,6 +559,8 @@ async fn post_email_token(data: JsonUpcase, headers: Headers, mu if let Err(e) = mail::send_change_email(&data.NewEmail, &token).await { error!("Error sending change-email email: {:#?}", e); } + } else { + debug!("Email change request for user ({}) to email ({}) with token ({})", user.uuid, data.NewEmail, token); } user.email_new = Some(data.NewEmail); diff --git a/src/static/templates/email/change_email.hbs b/src/static/templates/email/change_email.hbs index 4262fd74ae..f5276512d4 100644 --- a/src/static/templates/email/change_email.hbs +++ b/src/static/templates/email/change_email.hbs @@ -2,5 +2,5 @@ Your Email Change To finalize changing your email address enter the following code in web vault: {{token}} -If you did not try to change an email address, you can safely ignore this email. +If you did not try to change your email address, contact your administrator. {{> email/email_footer_text }} diff --git a/src/static/templates/email/change_email.html.hbs b/src/static/templates/email/change_email.html.hbs index aecf88591d..488b085cb3 100644 --- a/src/static/templates/email/change_email.html.hbs +++ b/src/static/templates/email/change_email.html.hbs @@ -9,7 +9,7 @@ Your Email Change - If you did not try to change an email address, you can safely ignore this email. + If you did not try to change your email address, contact your administrator.