Browse Source

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
Joshua M. Boniface 6 years ago
parent
commit
4b8f735cb8
1 changed files with 3 additions and 6 deletions
  1. 3 6
      Emby.Server.Implementations/Library/UserManager.cs

+ 3 - 6
Emby.Server.Implementations/Library/UserManager.cs

@@ -311,13 +311,10 @@ namespace Emby.Server.Implementations.Library
                     user = Users
                     user = Users
                         .FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase));
                         .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);
                     }
                     }
                 }
                 }
             }
             }