Exemplo n.º 1
0
 /**
  * @param UserDto $user
  * @return void
  */
 public function sendActivationEmailAction(UserDto $user)
 {
     $token = $this->doubleOptInHelper->generateToken($user->getEmail(), 'id.neos.io registration', ['user' => $user]);
     $this->doubleOptInHelper->setRequest($this->request);
     $this->doubleOptInHelper->sendActivationMail($user->getEmail(), $token);
     $this->addFlashMessage('We\'ve sent you an email with a link to activate your account!', '', Message::SEVERITY_OK);
     $this->redirect('index');
 }
 /**
  * @param string $username
  * @return void
  */
 public function sendResetLinkAction($username)
 {
     $userData = $this->crowdClient->getUser($username);
     if ($userData !== NULL) {
         $token = $this->doubleOptInHelper->generateToken($userData['email'], 'id.neos.io reset password', $userData);
         $this->doubleOptInHelper->setRequest($this->request);
         $this->doubleOptInHelper->sendActivationMail($userData['email'], $token);
         $this->redirect('resetPasswordMailSent');
     }
     //TODO: error handling
 }