diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2018-01-11 23:19:38 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-01-12 00:19:38 +0200 |
commit | e5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a (patch) | |
tree | cbd22852523b05ad2e6472f65228b9b4822c2f05 /routers/api/v1/admin | |
parent | 9aed18073dd825c7bcd00aef39ef282fec863796 (diff) | |
download | gitea-e5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a.tar.gz gitea-e5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a.zip |
Cleanup models.User.HashPassword (#3334)
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/user.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 5bbb8a7afd..69e1761b09 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -126,13 +126,12 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { } if len(form.Password) > 0 { - u.Passwd = form.Password var err error if u.Salt, err = models.GetUserSalt(); err != nil { ctx.Error(500, "UpdateUser", err) return } - u.HashPassword() + u.HashPassword(form.Password) } u.LoginName = form.LoginName |