mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-06 09:09:21 -07:00
use email instead of empty name for webauhn (#6733)
* if empty use email instead of name for webauhn * use email as display name if name is empty
This commit is contained in:
@@ -231,6 +231,15 @@ impl User {
|
||||
pub fn reset_stamp_exception(&mut self) {
|
||||
self.stamp_exception = None;
|
||||
}
|
||||
|
||||
pub fn display_name(&self) -> &str {
|
||||
// default to email if name is empty
|
||||
if !&self.name.is_empty() {
|
||||
&self.name
|
||||
} else {
|
||||
&self.email
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Database methods
|
||||
|
||||
Reference in New Issue
Block a user