mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-02 03:42:41 +02:00
use email as display name if name is empty
This commit is contained in:
parent
63f47df942
commit
59560e378a
2 changed files with 3 additions and 3 deletions
|
|
@ -3207,7 +3207,7 @@ async fn put_reset_password(
|
|||
|
||||
// Sending email before resetting password to ensure working email configuration and the resulting
|
||||
// user notification. Also this might add some protection against security flaws and misuse
|
||||
if let Err(e) = mail::send_admin_reset_password(&user.email, &user.name, &org.name).await {
|
||||
if let Err(e) = mail::send_admin_reset_password(&user.email, user.display_name(), &org.name).await {
|
||||
err!(format!("Error sending user reset password email: {e:#?}"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ async fn _sso_login(
|
|||
Some((user, _)) if !user.enabled => {
|
||||
err!(
|
||||
"This user has been disabled",
|
||||
format!("IP: {}. Username: {}.", ip.ip, user.name),
|
||||
format!("IP: {}. Username: {}.", ip.ip, user.display_name()),
|
||||
ErrorEvent {
|
||||
event: EventType::UserFailedLogIn
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ async fn authenticated_response(
|
|||
result["TwoFactorToken"] = Value::String(token);
|
||||
}
|
||||
|
||||
info!("User {} logged in successfully. IP: {}", &user.name, ip.ip);
|
||||
info!("User {} logged in successfully. IP: {}", user.display_name(), ip.ip);
|
||||
Ok(Json(result))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue