(tx *storage.Connection, password string)
| 195 | } |
| 196 | |
| 197 | func (u *User) UpdatePassword(tx *storage.Connection, password string) error { |
| 198 | pw, err := hashPassword(password) |
| 199 | if err != nil { |
| 200 | return err |
| 201 | } |
| 202 | u.EncryptedPassword = pw |
| 203 | return tx.UpdateOnly(u, "encrypted_password") |
| 204 | } |
| 205 | |
| 206 | // Authenticate a user from a password |
| 207 | func (u *User) Authenticate(password string) bool { |
no test coverage detected