diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-06-09 13:57:49 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2019-06-09 13:57:49 -0400 |
| commit | 4b8f735cb89901bd1004d590f4f2820c23e2493c (patch) | |
| tree | 12809b73e26f2969610b0e526bfaf8e98a430e86 | |
| parent | c230d49d7c37d4fbe77676b835c3afd6c8cb56e7 (diff) | |
Remove superfluous conditional
This wasn't needed to prevent updating the policy on-disk from my
tests and can be removed as suggested by @Bond-009
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 4233ea8f4..16becbd52 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -311,13 +311,10 @@ namespace Emby.Server.Implementations.Library user = Users .FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); - if (authenticationProvider.GetType() != typeof(InvalidAuthProvider)) + if (authenticationProvider is IHasNewUserPolicy hasNewUserPolicy) { - if (authenticationProvider is IHasNewUserPolicy hasNewUserPolicy) - { - var policy = hasNewUserPolicy.GetNewUserPolicy(); - UpdateUserPolicy(user, policy, true); - } + var policy = hasNewUserPolicy.GetNewUserPolicy(); + UpdateUserPolicy(user, policy, true); } } } |
