diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index b6e7630ae..8f0695d6b 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -200,14 +200,14 @@ namespace IRaCIS.Application.Services
}
///
- /// Result 为true 的时候 允许提交设置
+ /// Result 为true 的时候 认为链接没有失效
///
///
///
[HttpGet]
public async Task 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 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("您的初始化链接已过期");
}