From 97dbcdc73a899c009e09284d35f19ba41c2bc96c Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Thu, 25 Jun 2026 01:23:23 -0500 Subject: [PATCH] Ensure normalized username and email are populated Fixes #415 --- LANCommander.Server.Services/UserService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LANCommander.Server.Services/UserService.cs b/LANCommander.Server.Services/UserService.cs index 630d62cb..cc5f0b9a 100644 --- a/LANCommander.Server.Services/UserService.cs +++ b/LANCommander.Server.Services/UserService.cs @@ -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();