From 36477e7912615555f8e122a8d6871559ec7e9086 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Wed, 21 Feb 2024 11:58:28 +0800 Subject: [PATCH] fix: do not user ctx.User --- routers/web/auth/password.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/auth/password.go b/routers/web/auth/password.go index c23379b87ad1..1f2d1332820d 100644 --- a/routers/web/auth/password.go +++ b/routers/web/auth/password.go @@ -204,7 +204,7 @@ func ResetPasswdPost(ctx *context.Context) { Password: optional.Some(ctx.FormString("password")), MustChangePassword: optional.Some(false), } - if err := user_service.UpdateAuth(ctx, ctx.Doer, opts); err != nil { + if err := user_service.UpdateAuth(ctx, u, opts); err != nil { ctx.Data["IsResetForm"] = true ctx.Data["Err_Password"] = true switch {