From 106c77a26c72679ea2a80409470a4a57b02d6838 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Mon, 18 Mar 2019 11:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E5=BF=98?= =?UTF-8?q?=E8=AE=B0=E5=AF=86=E7=A0=81=E5=8A=9F=E8=83=BD=E5=85=88=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=94=A8=E6=88=B7=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E6=97=B6=E5=80=99=E4=B8=8D?= =?UTF-8?q?=E5=86=99=E5=85=A5=E6=95=B0=E6=8D=AE=E5=BA=93=20closed=20#ITRMN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=ITRMN --- Bootstrap.Admin/Controllers/Api/RegisterController.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Bootstrap.Admin/Controllers/Api/RegisterController.cs b/Bootstrap.Admin/Controllers/Api/RegisterController.cs index 59220f1e..8a761d77 100644 --- a/Bootstrap.Admin/Controllers/Api/RegisterController.cs +++ b/Bootstrap.Admin/Controllers/Api/RegisterController.cs @@ -1,4 +1,4 @@ -using Bootstrap.DataAccess; +using Bootstrap.DataAccess; using Longbow.Web.SignalR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -55,6 +55,10 @@ namespace Bootstrap.Admin.Controllers.Api /// /// [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); + } } }