diff options
Diffstat (limited to 'cmd/admin.go')
-rw-r--r-- | cmd/admin.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index b4e0c3cb5e..3ddf8eddf9 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -349,12 +349,11 @@ func runChangePassword(c *cli.Context) error { if err != nil { return err } - if user.Salt, err = models.GetUserSalt(); err != nil { + if err = user.SetPassword(c.String("password")); err != nil { return err } - user.HashPassword(c.String("password")) - if err := models.UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { + if err = models.UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { return err } |