summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2018-01-11 23:19:38 +0100
committerLauris BH <lauris@nix.lv>2018-01-12 00:19:38 +0200
commite5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a (patch)
treecbd22852523b05ad2e6472f65228b9b4822c2f05 /cmd
parent9aed18073dd825c7bcd00aef39ef282fec863796 (diff)
downloadgitea-e5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a.tar.gz
gitea-e5b8b4b5ec076b100b86845d2b4a8ff7ff71a87a.zip
Cleanup models.User.HashPassword (#3334)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index 5000fc2d4d..33d9daa446 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -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)
}