fix(user): don't crash when attempting to change a user's password
Resolves https://kolaente.dev/vikunja/api/issues/1587 Resolves https://github.com/go-vikunja/api/issues/79
This commit is contained in:
parent
665c046717
commit
40037f25f2
@ -549,7 +549,9 @@ func UpdateUserPassword(s *xorm.Session, user *User, newPassword string) (err er
|
|||||||
theUser.Password = hashed
|
theUser.Password = hashed
|
||||||
|
|
||||||
// Update it
|
// Update it
|
||||||
_, err = s.ID(user.ID).Update(theUser)
|
_, err = s.
|
||||||
|
Where("id = ?", user.ID).
|
||||||
|
Update(&User{Password: hashed})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user