mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
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>
This commit is contained in:
parent
a717a531bc
commit
9875f30836
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user