mirror of
https://github.com/lldap/lldap.git
synced 2026-03-31 15:07:48 +01:00
Add username to password recovey emails
This commit is contained in:
committed by
nitnelave
parent
c68f9e7cab
commit
f64f8625f1
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user