From 29144b2ce0d0f894ab20ad42368f1b62eaed3574 Mon Sep 17 00:00:00 2001 From: Jacques B Date: Sun, 17 Mar 2024 19:55:03 +0100 Subject: [PATCH] Small improvements around email change (#4415) --- 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 91555a55..b8a837a0 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 4262fd74..f5276512 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 aecf8859..488b085c 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.