aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-07-20 11:47:47 +0200
committerGitHub <noreply@github.com>2020-07-20 11:47:47 +0200
commit8f11e057a2b3a2263d629ebcfbf29e54defe1666 (patch)
treea2f40c3d4c9654f47eee153edc9b236b8810047d
parentc8539709acd57b933a339b407a9bdfeb8b6ce383 (diff)
parentd1e351a00ac47c2caa7e7e1a22e20c65d27cec7f (diff)
Merge pull request #3602 from crobibero/user-change-case
Fix username case change
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs4
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,