summaryrefslogtreecommitdiffstats
path: root/routers/web/auth/password.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/auth/password.go')
-rw-r--r--routers/web/auth/password.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/auth/password.go b/routers/web/auth/password.go
index 65d5c55976..8e309ebb1a 100644
--- a/routers/web/auth/password.go
+++ b/routers/web/auth/password.go
@@ -103,7 +103,7 @@ func commonResetPassword(ctx *context.Context) (*user_model.User, *auth.TwoFacto
ctx.Data["Title"] = ctx.Tr("auth.reset_password")
ctx.Data["Code"] = code
- if nil != ctx.User {
+ if nil != ctx.Doer {
ctx.Data["user_signed_in"] = true
}
@@ -133,8 +133,8 @@ func commonResetPassword(ctx *context.Context) (*user_model.User, *auth.TwoFacto
// Show the user that they are affecting the account that they intended to
ctx.Data["user_email"] = u.Email
- if nil != ctx.User && u.ID != ctx.User.ID {
- ctx.Flash.Error(ctx.Tr("auth.reset_password_wrong_user", ctx.User.Email, u.Email))
+ if nil != ctx.Doer && u.ID != ctx.Doer.ID {
+ ctx.Flash.Error(ctx.Tr("auth.reset_password_wrong_user", ctx.Doer.Email, u.Email))
return nil, nil
}
@@ -283,7 +283,7 @@ func MustChangePasswordPost(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplMustChangePassword)
return
}
- u := ctx.User
+ u := ctx.Doer
// Make sure only requests for users who are eligible to change their password via
// this method passes through
if !u.MustChangePassword {