forked from forgejo/forgejo
Cleanup models.User.HashPassword (#3334)
This commit is contained in:
parent
9aed18073d
commit
e5b8b4b5ec
7 changed files with 18 additions and 23 deletions
|
@ -107,11 +107,10 @@ func runChangePassword(c *cli.Context) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("%v", err)
|
||||
}
|
||||
user.Passwd = c.String("password")
|
||||
if user.Salt, err = models.GetUserSalt(); err != nil {
|
||||
return fmt.Errorf("%v", err)
|
||||
}
|
||||
user.HashPassword()
|
||||
user.HashPassword(c.String("password"))
|
||||
if err := models.UpdateUserCols(user, "passwd", "salt"); err != nil {
|
||||
return fmt.Errorf("%v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue