Cleanup models.User.HashPassword (#3334)

This commit is contained in:
Kim "BKC" Carlbäcker authored and Lauris BH committed 2018-01-12 00:19:38 +02:00
1 parent 9aed18073d
commit e5b8b4b5ec
7 files changed
+18 -23

No files matched your search

+1 -2
View File
@@ -126,13 +126,12 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) {
}
if len(form.Password) > 0 {
u.Passwd = form.Password
var err error
if u.Salt, err = models.GetUserSalt(); err != nil {
ctx.Error(500, "UpdateUser", err)
return
}
u.HashPassword()
u.HashPassword(form.Password)
}
u.LoginName = form.LoginName