fix(#IXRLO): 重置密码后Reset按钮仍然可用
#Comment comment #IXRLO #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IXRLO
This commit is contained in:
parent
01dfd03a59
commit
b48277c426
|
@ -169,14 +169,21 @@ namespace Bootstrap.DataAccess
|
|||
{
|
||||
if (!UserChecker(new User { UserName = userName, Password = password })) return false;
|
||||
if (DictHelper.RetrieveSystemModel() && RetrieveConstUsers().Any(u => userName.Equals(u.UserName, StringComparison.OrdinalIgnoreCase))) return true;
|
||||
return DbContextManager.Create<User>().ResetPassword(userName, password);
|
||||
var ret = DbContextManager.Create<User>().ResetPassword(userName, password);
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: RetrieveUsersDataKey);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 忘记密码调用
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
public static bool ForgotPassword(ResetUser user) => DbContextManager.Create<User>().ForgotPassword(user);
|
||||
public static bool ForgotPassword(ResetUser user)
|
||||
{
|
||||
var ret = DbContextManager.Create<User>().ForgotPassword(user);
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: RetrieveUsersDataKey);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue