aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserManager.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-06-09 13:41:14 -0400
committerGitHub <noreply@github.com>2019-06-09 13:41:14 -0400
commitb70083f3b370055b2942e450291ce42345732cb7 (patch)
tree750ba52afa7d1588a5f44f11b89c8358394f8460 /Emby.Server.Implementations/Library/UserManager.cs
parent74ef3898798033a7cad987c4a869e7e72f57b229 (diff)
Apply suggestions from code review
Co-Authored-By: Claus Vium <cvium@users.noreply.github.com> Co-Authored-By: Bond-009 <bond.009@outlook.com>
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 83584acf3..04abfc315 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -313,8 +313,7 @@ namespace Emby.Server.Implementations.Library
if (authenticationProvider.GetType() != typeof(InvalidAuthProvider))
{
- var hasNewUserPolicy = authenticationProvider as IHasNewUserPolicy;
- if (hasNewUserPolicy != null)
+ if (authenticationProvider is IHasNewUserPolicy hasNewUserPolicy)
{
var policy = hasNewUserPolicy.GetNewUserPolicy();
UpdateUserPolicy(user, policy, true);
@@ -408,7 +407,7 @@ namespace Emby.Server.Implementations.Library
if (providers.Length == 0)
{
// Assign the user to the InvalidAuthProvider since no configured auth provider was valid/found
- _logger.LogWarning("User {0} was found with invalid/missing Authentication Provider {1}. Assigning user to InvalidAuthProvider until this is corrected", user.Name, user.Policy.AuthenticationProviderId);
+ _logger.LogWarning("User {UserName} was found with invalid/missing Authentication Provider {AuthenticationProviderId}. Assigning user to InvalidAuthProvider until this is corrected", user.Name, user.Policy.AuthenticationProviderId);
providers = new IAuthenticationProvider[] { _invalidAuthProvider };
}