Fix nullref exception and added logging

This commit is contained in:
Bond_009
2019-12-26 20:57:46 +01:00
parent 976459d3e8
commit 5ca68f9623
6 changed files with 41 additions and 65 deletions

View File

@@ -1726,6 +1726,7 @@ namespace Emby.Server.Implementations.Session
string.Equals(i.Client, client));
}
/// <inheritdoc />
public SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion)
{
if (info == null)
@@ -1733,7 +1734,7 @@ namespace Emby.Server.Implementations.Session
throw new ArgumentNullException(nameof(info));
}
var user = info.UserId.Equals(Guid.Empty)
var user = info.UserId == Guid.Empty
? null
: _userManager.GetUserById(info.UserId);