diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs index cc5dc12a27..57fcbe9e46 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs @@ -137,7 +137,9 @@ public class LoginModel : AccountPageModel using (CurrentTenant.Change(notAllowedUser.TenantId)) { await IdentityOptions.SetAsync(); - if (!await UserManager.CheckPasswordAsync(notAllowedUser, LoginInput.Password)) + if ((notAllowedUser.ShouldChangePasswordOnNextLogin || + await UserManager.ShouldPeriodicallyChangePasswordAsync(notAllowedUser)) && + !await UserManager.CheckPasswordAsync(notAllowedUser, LoginInput.Password)) { Alerts.Danger(L["InvalidUserNameOrPassword"]); return Page();