diff options
| author | Techywarrior <techywarrior@gmail.com> | 2013-04-13 17:04:49 -0700 |
|---|---|---|
| committer | Techywarrior <techywarrior@gmail.com> | 2013-04-13 17:04:49 -0700 |
| commit | 419d85116798bd5e5327c41d711d6cb46d70caeb (patch) | |
| tree | b7b94ae285e70f97c09c3343be4763ac59229957 /MediaBrowser.Api/BaseApiService.cs | |
| parent | 89ed33bbbcc3f47299a6104cbb1dd20ad3589510 (diff) | |
| parent | 7f1fdbf223f95dfc1435a8ff1b82fd635cc9b1d9 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/BaseApiService.cs | 9 |
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); + } } } |
