Add username to password recovey emails

This commit is contained in:
Valentin Tolmer
2025-09-05 01:00:14 +02:00
committed by nitnelave
parent c68f9e7cab
commit f64f8625f1
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -189,6 +189,7 @@ where
user.display_name
.as_deref()
.unwrap_or_else(|| user.user_id.as_str()),
user.user_id.as_str(),
user.email.as_str(),
&token,
&data.server_url,
+5 -1
View File
@@ -80,6 +80,7 @@ async fn send_email(
}
pub async fn send_password_reset_email(
display_name: &str,
username: &str,
to: &str,
token: &str,
@@ -93,7 +94,10 @@ pub async fn send_password_reset_email(
.unwrap()
.extend(["reset-password", "step2", token]);
let body = format!(
"Hello {username},
"Hello {display_name},
Your username is: \"{username}\"
This email has been sent to you in order to validate your identity.
If you did not initiate the process your credentials might have been
compromised. You should reset your password and contact an administrator.