aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/BaseApiService.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 17c36254e..ee90d2134 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -122,15 +122,13 @@ namespace MediaBrowser.Api
var auth = GetAuthorization(request);
- if (auth != null && auth.ContainsKey("UserId"))
+ if (auth != null)
{
- var userId = auth["UserId"];
-
User user = null;
- if (!string.IsNullOrEmpty(userId))
+ if (auth.ContainsKey("UserId"))
{
- user = UserManager.GetUserById(new Guid(userId));
+ user = UserManager.GetUserById(new Guid(auth["UserId"]));
}
var deviceId = auth["DeviceId"];