mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-15 22:42:43 +00:00
Cleanup models.User.HashPassword (#3334)
This commit is contained in:
parent
9aed18073d
commit
e5b8b4b5ec
7 changed files with 18 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue