Fix setting password
We were not acting on the error returning, and the sql sintax was wrong.
This commit is contained in:
parent
22065852b2
commit
de58f0251e
2 changed files with 9 additions and 4 deletions
|
@ -74,8 +74,8 @@ func (db *pgDB) SetPassword(name string, pass string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = db.sql.Model(user{}).
|
||||
Set("pass = ?, salt = ?", hash, salt).
|
||||
_, err = db.sql.Model(&user{}).
|
||||
Set("password = ?, salt = ?", hash, salt).
|
||||
Where("username = ?", name).
|
||||
Update()
|
||||
return err
|
||||
|
|
Reference in a new issue