1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-12 13:37:20 +00:00

Cleanup models.User.HashPassword (#3334)

This commit is contained in:
Kim "BKC" Carlbäcker
2018-01-11 23:19:38 +01:00
committed by Lauris BH
parent 9aed18073d
commit e5b8b4b5ec
7 changed files with 18 additions and 23 deletions

View File

@ -194,13 +194,12 @@ func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) {
}
if len(form.Password) > 0 {
u.Passwd = form.Password
var err error
if u.Salt, err = models.GetUserSalt(); err != nil {
ctx.ServerError("UpdateUser", err)
return
}
u.HashPassword()
u.HashPassword(form.Password)
}
u.LoginName = form.LoginName