Ensure normalized username and email are populated

Fixes #415
This commit is contained in:
Pat Hartl 2026-06-25 01:23:23 -05:00
parent e64439df66
commit 97dbcdc73a

View file

@ -139,6 +139,10 @@ namespace LANCommander.Server.Services
{
user.SecurityStamp = Guid.NewGuid().ToString();
user.ConcurrencyStamp = Guid.NewGuid().ToString();
user.NormalizedUserName = user.UserName.ToUpperInvariant();
if (!string.IsNullOrEmpty(user.Email))
user.NormalizedEmail = user.Email.ToUpperInvariant();
// hash & set password
var hasher = new PasswordHasher<User>();