diff --git a/Directory.Build.props b/Directory.Build.props index 0dfe7a14..873c3211 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ VirtoCommerce - 6.33.0 + 6.34.0 $(VersionSuffix)-$(BuildNumber) diff --git a/VirtoCommerce.Storefront/Controllers/AccountController.cs b/VirtoCommerce.Storefront/Controllers/AccountController.cs index af58e7df..14bcb847 100644 --- a/VirtoCommerce.Storefront/Controllers/AccountController.cs +++ b/VirtoCommerce.Storefront/Controllers/AccountController.cs @@ -121,10 +121,11 @@ private async Task SignOutAndSignInAsync(User user) await SetLastLoginDate(user); } - private async Task SetLastLoginDate(User user) + private Task SetLastLoginDate(User user) { user.LastLoginDate = DateTime.UtcNow; - await _signInManager.UserManager.UpdateAsync(user); + user.AccessFailedCount = 0; + return _signInManager.UserManager.UpdateAsync(user); } } } diff --git a/VirtoCommerce.Storefront/Controllers/Api/ApiAccountController.cs b/VirtoCommerce.Storefront/Controllers/Api/ApiAccountController.cs index e9ca3af8..8ff8774a 100644 --- a/VirtoCommerce.Storefront/Controllers/Api/ApiAccountController.cs +++ b/VirtoCommerce.Storefront/Controllers/Api/ApiAccountController.cs @@ -528,10 +528,11 @@ private async Task SendNotificationAsync(NotificationBas return result; } - private async Task SetLastLoginDate(User user) + private Task SetLastLoginDate(User user) { user.LastLoginDate = DateTime.UtcNow; - await _signInManager.UserManager.UpdateAsync(user); + user.AccessFailedCount = 0; + return _signInManager.UserManager.UpdateAsync(user); } // GET: storefrontapi/account/passwordrequirements