aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Users/UserManager.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2020-10-27 12:12:08 -0400
committerPatrick Barron <barronpm@gmail.com>2020-10-27 12:12:08 -0400
commitf051590f14d38012bd8885c6e5ed0406d3c91ecc (patch)
treea94a06094877f27246244ad16b02e5986d06e881 /Jellyfin.Server.Implementations/Users/UserManager.cs
parentaff8684d2e513d4c73e7919f464e2d34d6d63047 (diff)
Apply suggestions
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/UserManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index c8b754514..efc3f439d 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -49,7 +49,7 @@ namespace Jellyfin.Server.Implementations.Users
private readonly DefaultAuthenticationProvider _defaultAuthenticationProvider;
private readonly DefaultPasswordResetProvider _defaultPasswordResetProvider;
- private readonly IDictionary<Guid, User> _users = new ConcurrentDictionary<Guid, User>();
+ private readonly IDictionary<Guid, User> _users;
/// <summary>
/// Initializes a new instance of the <see cref="UserManager"/> class.
@@ -85,6 +85,7 @@ namespace Jellyfin.Server.Implementations.Users
_defaultAuthenticationProvider = _authenticationProviders.OfType<DefaultAuthenticationProvider>().First();
_defaultPasswordResetProvider = _passwordResetProviders.OfType<DefaultPasswordResetProvider>().First();
+ _users = new ConcurrentDictionary<Guid, User>();
using var dbContext = _dbProvider.CreateContext();
foreach (var user in dbContext.Users
.Include(user => user.Permissions)
@@ -101,16 +102,10 @@ namespace Jellyfin.Server.Implementations.Users
public event EventHandler<GenericEventArgs<User>>? OnUserUpdated;
/// <inheritdoc/>
- public IEnumerable<User> Users
- {
- get { return _users.Values; }
- }
+ public IEnumerable<User> Users => _users.Values;
/// <inheritdoc/>
- public IEnumerable<Guid> UsersIds
- {
- get { return _users.Keys; }
- }
+ public IEnumerable<Guid> UsersIds => _users.Keys;
/// <inheritdoc/>
public User? GetUserById(Guid id)