aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/UserManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-12-05 13:37:55 -0500
committerGitHub <noreply@github.com>2017-12-05 13:37:55 -0500
commitc32d8656382a0eacb301692e0084377fc433ae9b (patch)
tree121dd382bf71a9b5c96e00771c0ba18a7d28ab87 /Emby.Server.Implementations/Library/UserManager.cs
parente7ffdf3fbdae7d4ec76a0a4e0e37792b079c56e5 (diff)
parentb3fbdde04305a0406b5322ec6947f8a30ddc12af (diff)
Merge pull request #3055 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 0f48ff46b..71c953b2c 100644
--- a/Emby.Server.Implementations/Library/UserManager.cs
+++ b/Emby.Server.Implementations/Library/UserManager.cs
@@ -218,7 +218,7 @@ namespace Emby.Server.Implementations.Library
return builder.ToString();
}
- public async Task<User> AuthenticateUser(string username, string password, string hashedPassword, string passwordMd5, string remoteEndPoint)
+ public async Task<User> AuthenticateUser(string username, string password, string hashedPassword, string passwordMd5, string remoteEndPoint, bool isUserSession)
{
if (string.IsNullOrWhiteSpace(username))
{
@@ -288,8 +288,11 @@ namespace Emby.Server.Implementations.Library
// Update LastActivityDate and LastLoginDate, then save
if (success)
{
- user.LastActivityDate = user.LastLoginDate = DateTime.UtcNow;
- UpdateUser(user);
+ if (isUserSession)
+ {
+ user.LastActivityDate = user.LastLoginDate = DateTime.UtcNow;
+ UpdateUser(user);
+ }
UpdateInvalidLoginAttemptCount(user, 0);
}
else
@@ -812,7 +815,7 @@ namespace Emby.Server.Implementations.Library
var text = new StringBuilder();
- var localAddress = _appHost.GetLocalApiUrl().Result ?? string.Empty;
+ var localAddress = _appHost.GetLocalApiUrl(CancellationToken.None).Result ?? string.Empty;
text.AppendLine("Use your web browser to visit:");
text.AppendLine(string.Empty);