Ejemplo n.º 1
0
 /**
  * Does exactly what it says it does
  *
  * @param array $credentials
  * @return array|null|string
  */
 public function getUserAndSendEmail(array $credentials)
 {
     try {
         $this->user = $this->passwordBroker->getUser($credentials);
     } catch (UnexpectedValueException $e) {
         return PasswordBroker::INVALID_USER;
     }
     // trigger the mail send event
     $this->mailResult = event(new PasswordResetWasRequested($this->user));
     return empty($this->mailResult) ? null : PasswordBroker::RESET_LINK_SENT;
 }
Ejemplo n.º 2
0
 /**
  * Get the user for the given credentials.
  *
  * @param array $credentials
  * @return \Illuminate\Contracts\Auth\CanResetPassword 
  * @throws \UnexpectedValueException
  * @static 
  */
 public static function getUser($credentials)
 {
     return \Illuminate\Auth\Passwords\PasswordBroker::getUser($credentials);
 }