From c2252b4e9f15975c41a5da82f24ed1a1b3b16e38 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 22 Apr 2025 17:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/UserService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 2666bbfa2..31f10f4b0 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -989,6 +989,12 @@ namespace IRaCIS.Core.Application.Service }); + //超过90天没修改密码 + if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value) + { + loginUser.NeedChangePassWord = true; + } + if (existUserLoginInfo.LastLoginIP != string.Empty) { // 与上一次区域不一致 @@ -1004,11 +1010,7 @@ namespace IRaCIS.Core.Application.Service //异地登录 loginUser.LoginState = 2; - //超过90天没修改密码 - if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value) - { - loginUser.NeedChangePassWord = true; - } + } } }