mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[EC-1032] if name is Empty, set to null before saving (#2619)
This commit is contained in:
@ -178,6 +178,12 @@ public class UserService : UserManager<User>, IUserService, IDisposable
|
||||
throw new ApplicationException("Use register method to create a new user.");
|
||||
}
|
||||
|
||||
// if the name is empty, set it to null
|
||||
if (String.Equals(user.Name, String.Empty))
|
||||
{
|
||||
user.Name = null;
|
||||
}
|
||||
|
||||
user.RevisionDate = user.AccountRevisionDate = DateTime.UtcNow;
|
||||
await _userRepository.ReplaceAsync(user);
|
||||
|
||||
|
Reference in New Issue
Block a user