Do not use `ctx.Doer` when reset password (#29289)

Fix #29278.

Caused by a small typo in #28733
This commit is contained in:
Jason Song 2024-02-21 12:57:22 +08:00 committed by GitHub
parent 3d3c3d9ee5
commit 22b8de85dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 {