// UpdatePassword checks and update's users password.
// NOTE: it will also check the old/current password before
// setting a new one.
// First return value determines whether the password was set or not.
UpdatePassword checks and update's users password.
NOTE: it will also check the old/current password before
setting a new one.
First return value determines whether the password was set or not.
// UpdatePassword checks and update ' s users password . // NOTE : it will also check the old / current password before // setting a new one . // First return value determines whether the password was set or not .
func (c *Core) UpdatePassword(oldPass, newPass string) (bool, error) {
	if c.PasswordHash != nil && !c.IsPasswordCorrect(oldPass) {
		return false, ErrInvalidPassword
	}
	return c.SetPassword(newPass)
}
func ( c * Core ) UpdatePassword ( oldPass , newPass string ) ( bool , error ) { if c . PasswordHash != nil && ! c . IsPasswordCorrect ( oldPass ) { return false , ErrInvalidPassword } return c . SetPassword ( newPass ) }
UpdatePassword checks and update's users password.
UpdatePassword checks and update ' s users password .