验证密码
continuous-integration/drone/push Build is failing Details

IRC_NewDev
he 2024-10-09 15:01:37 +08:00
parent ceedafb6b9
commit b94bc8eff1
1 changed files with 7 additions and 2 deletions

View File

@ -98,13 +98,18 @@ namespace IRaCIS.Core.Application.Service
} }
if (oldPwd != null) if (oldPwd == null)
{
oldPwd = await _userRepository.Where(x => x.Id == userId).Select(x => x.Password).FirstOrDefaultAsync();
}
if (!oldPwd.IsNotNullOrEmpty())
{ {
await _userPassWordLogRepository.AddAsync(new UserPassWordLog() await _userPassWordLogRepository.AddAsync(new UserPassWordLog()
{ {
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
PassWord = oldPwd, PassWord = oldPwd!,
UserId = userId, UserId = userId,
}); });
} }