aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/BaseApiService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-13 15:40:49 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-13 15:40:49 -0400
commit3f9a412b027667d2eabd3b05db2789e732a9a3ff (patch)
tree9170d99e3fd5b854c0e8f5f742d03808e6541965 /MediaBrowser.Api/BaseApiService.cs
parent5231cab777e37c908ef1650bae86c7b0ecb32499 (diff)
fix user request logging
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
-rw-r--r--MediaBrowser.Api/BaseApiService.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index 8fcef654d..e644f1f31 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -110,9 +110,14 @@ namespace MediaBrowser.Api
if (auth != null && auth.ContainsKey("UserId"))
{
- var user = UserManager.GetUserById(new Guid(auth["UserId"]));
+ var userId = auth["UserId"];
- UserManager.LogUserActivity(user, auth["Client"], auth["DeviceId"], auth["Device"] ?? string.Empty);
+ if (!string.IsNullOrEmpty(userId))
+ {
+ var user = UserManager.GetUserById(new Guid(userId));
+
+ UserManager.LogUserActivity(user, auth["Client"], auth["DeviceId"], auth["Device"] ?? string.Empty);
+ }
}
}