Add username to password recovey emails

This commit is contained in:
Valentin Tolmer authored and nitnelave committed 2025-09-14 15:44:37 +02:00
1 parent c68f9e7cab
commit f64f8625f1
2 files changed
+6 -1

No files matched your search

+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.