From 9c15c14e1afd0896911f263b76f5812938c73066 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 30 May 2022 09:56:48 +0800
Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=A4=B1=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/Service/Management/UserService.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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("您的初始化链接已过期");
}