From 432a5496f2e2300427541caec30a7fe4e915f15e Mon Sep 17 00:00:00 2001 From: aiden Date: Thu, 19 Oct 2023 18:25:25 +0800 Subject: [PATCH] fix: skip checking password when the code is provided (#2425) Co-authored-by: aidenlu --- controllers/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/user.go b/controllers/user.go index 8c273810..da154343 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -478,7 +478,7 @@ func (c *ApiController) SetPassword() { return } } - } else { + } else if code == "" { msg := object.CheckPassword(targetUser, oldPassword, c.GetAcceptLanguage()) if msg != "" { c.ResponseError(msg)