Exemplo n.º 1
0
 /**
  * If an user with the given email exists then generate a token for password
  * change and saves it in the 'password_reminders' table with the email
  * of the user.
  *
  * @param string $email
  *
  * @return string $token
  */
 public function forgotPassword($email)
 {
     if ($this->passService->isThrottled()) {
         return 'trottling';
     }
     $user = $this->repo->getUserByEmail($email);
     if ($user) {
         return $this->passService->requestChangePassword($user);
     }
     $this->passService->countThrottle();
     return false;
 }