The Free Software Media System - Server Backend & API
fix user request logging
Luke Pulverenti3f9a412b0276
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.csindex 8fcef654dd..e644f1f313 100644--- a/MediaBrowser.Api/BaseApiService.cs+++ b/MediaBrowser.Api/BaseApiService.cs@@ -110,9 +110,14 @@ namespace MediaBrowser.Apiif (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);+ }}}