diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-07-20 11:47:47 +0200 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-07-27 18:53:09 -0400 |
| commit | 9875f3083632f0cd6f7049dcea8680b6d34954be (patch) | |
| tree | 6e9b5a0bc3a3f19b87cdfaf60dffe49625e1fc85 /Jellyfin.Server.Implementations | |
| parent | a717a531bc6c0b68dcd994a197e7bfd2fccb6538 (diff) | |
Merge pull request #3602 from crobibero/user-change-case
Fix username case change
(cherry picked from commit 8f11e057a2b3a2263d629ebcfbf29e54defe1666)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Server.Implementations')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index e3a7d5467..343f452c7 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -152,12 +152,12 @@ namespace Jellyfin.Server.Implementations.Users throw new ArgumentException("Invalid username", nameof(newName)); } - if (user.Username.Equals(newName, StringComparison.OrdinalIgnoreCase)) + if (user.Username.Equals(newName, StringComparison.Ordinal)) { throw new ArgumentException("The new and old names must be different."); } - if (Users.Any(u => u.Id != user.Id && u.Username.Equals(newName, StringComparison.OrdinalIgnoreCase))) + if (Users.Any(u => u.Id != user.Id && u.Username.Equals(newName, StringComparison.Ordinal))) { throw new ArgumentException(string.Format( CultureInfo.InvariantCulture, |
