Compare commits
2 Commits
e1e7abb65a
...
d35bdb6899
Author | SHA1 | Date |
---|---|---|
|
d35bdb6899 | |
|
b7fe79208e |
|
@ -996,11 +996,20 @@ namespace IRaCIS.Core.Application.Service
|
||||||
loginUser.NeedChangePassWord = true;
|
loginUser.NeedChangePassWord = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existUserLoginInfo.LastLoginIP != string.Empty)
|
List<UserOptType> userOptTypes = new List<UserOptType>() {
|
||||||
|
UserOptType.Login,
|
||||||
|
UserOptType.AccountOrPasswordError,
|
||||||
|
UserOptType.LoginLockedAccount
|
||||||
|
};
|
||||||
|
|
||||||
|
var lastLoginIPRegion = await _userLogRepository.Where(t => t.ActionIdentityUserId == existUserLoginInfo.Id && userOptTypes.Contains(t.OptType))
|
||||||
|
.OrderByDescending(t => t.CreateTime).Select(t => t.IPRegion).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (lastLoginIPRegion != string.Empty)
|
||||||
{
|
{
|
||||||
// 与上一次区域不一致
|
// 与上一次区域不一致
|
||||||
//if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion))
|
//if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion))
|
||||||
if (existUserLoginInfo.LastLoginIP != iPRegion)
|
if (lastLoginIPRegion != iPRegion)
|
||||||
{
|
{
|
||||||
|
|
||||||
isLoginUncommonly = true;
|
isLoginUncommonly = true;
|
||||||
|
|
Loading…
Reference in New Issue