Reset a given user password
public resetPassword ( $code, $password ) : Cartalyst\Sentry\Users\UserInterface | ||
$code | ||
$password | ||
return | Cartalyst\Sentry\Users\UserInterface |
/** * Reset a given user password * * @author Steve Montambeault * @link http://stevemo.ca * * @param array $creds * * @return bool */ public function reset(array $creds) { try { if ($this->validator->with($creds)->passes()) { $this->users->resetPassword($creds['code'], $creds['password']); return true; } } catch (UserNotFoundException $e) { $this->validator->add('UserNotFoundException', $e->getMessage()); } return false; }