aboutsummaryrefslogtreecommitdiffstats
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.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/password.go b/routers/web/auth/password.go
index 3812d582e5..614e086f77 100644
--- a/routers/web/auth/password.go
+++ b/routers/web/auth/password.go
@@ -113,7 +113,7 @@ func commonResetPassword(ctx *context.Context) (*user_model.User, *auth.TwoFacto
}
// Fail early, don't frustrate the user
- u := user_model.VerifyUserActiveCode(ctx, code)
+ u := user_model.VerifyUserTimeLimitCode(ctx, &user_model.TimeLimitCodeOptions{Purpose: user_model.TimeLimitCodeResetPassword}, code)
if u == nil {
ctx.Flash.Error(ctx.Tr("auth.invalid_code_forgot_password", fmt.Sprintf("%s/user/forgot_password", setting.AppSubURL)), true)
return nil, nil