diff options
Diffstat (limited to 'routers/user/setting.go')
-rw-r--r-- | routers/user/setting.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index dcd0eedb8d..b674c24b44 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -229,13 +229,12 @@ func SettingsSecurityPost(ctx *context.Context, form auth.ChangePasswordForm) { } else if form.Password != form.Retype { ctx.Flash.Error(ctx.Tr("form.password_not_match")) } else { - ctx.User.Passwd = form.Password var err error if ctx.User.Salt, err = models.GetUserSalt(); err != nil { ctx.ServerError("UpdateUser", err) return } - ctx.User.HashPassword() + ctx.User.HashPassword(form.Password) if err := models.UpdateUserCols(ctx.User, "salt", "passwd"); err != nil { ctx.ServerError("UpdateUser", err) return |