修改登录状态

Uat_IRC_Net8
he 2025-01-16 11:12:55 +08:00
parent f4a97b940a
commit 82167463e4
2 changed files with 5 additions and 2 deletions

View File

@ -99,6 +99,8 @@ namespace IRaCIS.Application.Contracts
public bool IsZhiZhun { get; set; }
public bool IsFirstAdd { get; set; }
public bool NeedChangePassWord { get; set; } = false;
public bool PasswordChanged { get; set; }

View File

@ -887,7 +887,8 @@ namespace IRaCIS.Core.Application.Service
//超过90天没修改密码
if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
{
loginUser.LoginState = 1;
loginUser.NeedChangePassWord = true;
}
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.IdentityUserId, OptUserId = loginUser.IdentityUserId, OptType = UserOptType.Login }, true);
@ -1052,7 +1053,7 @@ namespace IRaCIS.Core.Application.Service
//超过90天没修改密码
if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
{
loginUser.LoginState = 1;
loginUser.NeedChangePassWord = true;
}
#endregion