diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index dda9658d4..d9f28915a 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -101,6 +101,11 @@ namespace MediaBrowser.Server.Implementations.Session /// <exception cref="System.ArgumentNullException">user</exception> public Task LogConnectionActivity(string clientType, string deviceId, string deviceName, User user) { + if (user != null && user.Configuration.IsDisabled) + { + throw new UnauthorizedAccessException(string.Format("The {0} account is currently disabled. Please consult with your administrator.", user.Name)); + } + var activityDate = DateTime.UtcNow; GetConnection(clientType, deviceId, deviceName, user).LastActivityDate = activityDate; |
