修改BUG:忘记密码功能先判断用户是否存在不存在的时候不写入数据库 closed #ITRMN
#Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=ITRMN
This commit is contained in:
parent
c6749fff24
commit
106c77a26c
|
@ -1,4 +1,4 @@
|
||||||
using Bootstrap.DataAccess;
|
using Bootstrap.DataAccess;
|
||||||
using Longbow.Web.SignalR;
|
using Longbow.Web.SignalR;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
@ -55,6 +55,10 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
/// <param name="user"></param>
|
/// <param name="user"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
public bool Put([FromBody]ResetUser user) => UserHelper.ForgotPassword(user);
|
public bool Put([FromBody]ResetUser user)
|
||||||
|
{
|
||||||
|
if (UserHelper.RetrieveUserByUserName(user.UserName) == null) return true;
|
||||||
|
return UserHelper.ForgotPassword(user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue