diff options
| author | Bond_009 <Bond.009@outlook.com> | 2019-06-09 22:08:01 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-08-16 21:06:11 +0200 |
| commit | 8d3b5c851ded74b9f34eb2cd963187761a3f6f61 (patch) | |
| tree | 335cadb62ae190f68b0c81801354096b4ab7e856 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | 7a27dd8a1b7578a1dcef27f6852de1ae805a7d67 (diff) | |
Improvements to UserManager
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 0347100a4..61329160a 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1375,16 +1375,14 @@ namespace Emby.Server.Implementations.Session CheckDisposed(); User user = null; - if (!request.UserId.Equals(Guid.Empty)) + if (request.UserId != Guid.Empty) { - user = _userManager.Users - .FirstOrDefault(i => i.Id == request.UserId); + user = _userManager.GetUserById(request.UserId); } if (user == null) { - user = _userManager.Users - .FirstOrDefault(i => string.Equals(request.Username, i.Name, StringComparison.OrdinalIgnoreCase)); + user = _userManager.GetUserByName(request.Username); } if (user != null) |
