1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

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

Fix #29278.

Caused by a small typo in #28733

(cherry picked from commit 22b8de85ddda50725480b21c5bf6ef9c0202b5e9)
This commit is contained in:
Jason Song 2024-02-21 12:57:22 +08:00 committed by Earl Warren
parent f803c5c0f4
commit 52bf6bf60c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

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 {