链接失效

Uat_Study
hang 2022-05-30 09:56:48 +08:00
parent 458ca443fd
commit 9c15c14e1a
1 changed files with 3 additions and 3 deletions

View File

@ -200,14 +200,14 @@ namespace IRaCIS.Application.Services
}
/// <summary>
/// Result 为true 的时候 允许提交设置
/// Result 为true 的时候 认为链接没有失效
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
[HttpGet]
public async Task<IResponseOutput> VerifyCanInitSetUserNameAndPwd(Guid userId)
{
return ResponseOutput.Ok(await _userRepository.AnyAsync(t => t.Id == userId && t.EmailToken == _userInfo.UserToken));
return ResponseOutput.Ok(await _userRepository.AnyAsync(t => t.Id == userId && t.EmailToken == _userInfo.UserToken && t.IsFirstAdd));
}
@ -215,7 +215,7 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> InitSetUserNameAndPwd(Guid userId, string newUserName, string newPWd)
{
if (!await _userRepository.AnyAsync(t => t.Id == userId && t.EmailToken==_userInfo.UserToken))
if (!await _userRepository.AnyAsync(t => t.Id == userId && t.EmailToken==_userInfo.UserToken && t.IsFirstAdd))
{
return ResponseOutput.NotOk("您的初始化链接已过期");
}