diff options
author | Joe Chen <jc@unknwon.io> | 2022-10-23 19:15:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 19:15:14 +0800 |
commit | c58c89362161718e1079b9d43c0ce984bb1506cc (patch) | |
tree | 14a54295b60b4c2887f06bfde8b7e603e0f4d6dd /internal/route/user/auth.go | |
parent | ef0388045f8fd35a40b3404deb3caa1a37e103f7 (diff) |
refactor(db): migrate password methods off `user.go` (#7205)
Diffstat (limited to 'internal/route/user/auth.go')
-rw-r--r-- | internal/route/user/auth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/route/user/auth.go b/internal/route/user/auth.go index 213ff050..d06a7488 100644 --- a/internal/route/user/auth.go +++ b/internal/route/user/auth.go @@ -19,6 +19,7 @@ import ( "gogs.io/gogs/internal/email" "gogs.io/gogs/internal/form" "gogs.io/gogs/internal/tool" + "gogs.io/gogs/internal/userutil" ) const ( @@ -554,7 +555,7 @@ func ResetPasswdPost(c *context.Context) { c.Error(err, "get user salt") return } - u.EncodePassword() + u.Password = userutil.EncodePassword(u.Password, u.Salt) if err := db.UpdateUser(u); err != nil { c.Error(err, "update user") return |