aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserManager.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-02-14 03:02:06 +0900
committerdkanada <dkanada@users.noreply.github.com>2020-02-14 03:02:06 +0900
commit53db52666798e5193fb3e4c0c957de1258ed20c9 (patch)
treeefd3f41884ce2e506f96920ae0e30e17e2a3e062 /Emby.Server.Implementations/Library/UserManager.cs
parent1cb51a8ac79c8cc2b2bde3e4279b18765a5851e6 (diff)
parentcf2626428c0d4755662855fe6c3e4f439c909de9 (diff)
merge branch master into refactor
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 656eeb145..6e203f894 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -291,10 +291,11 @@ namespace Emby.Server.Implementations.Library
&& authenticationProvider != null
&& !(authenticationProvider is DefaultAuthenticationProvider))
{
- // We should trust the user that the authprovider says, not what was typed
+ // Trust the username returned by the authentication provider
username = updatedUsername;
- // Search the database for the user again; the authprovider might have created it
+ // Search the database for the user again
+ // the authentication provider might have created it
user = Users
.FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase));
@@ -667,7 +668,7 @@ namespace Emby.Server.Implementations.Library
throw new ArgumentException("Invalid username", nameof(newName));
}
- if (user.Name.Equals(newName, StringComparison.OrdinalIgnoreCase))
+ if (user.Name.Equals(newName, StringComparison.Ordinal))
{
throw new ArgumentException("The new and old names must be different.");
}