예제 #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
 }
 /**
  * Actually convert from $source to $targetType, taking into account the fully
  * built $convertedChildProperties and $configuration.
  *
  * @param mixed $source
  * @param string $targetType
  * @param array $convertedChildProperties
  * @param \Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration
  *
  * @return Token|NULL the target type, or NULL if it was not a valid token
  */
 public function convertFrom($source, $targetType, array $convertedChildProperties = [], \Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = NULL)
 {
     $doubleOptinHelper = new Helper();
     return $doubleOptinHelper->validateTokenHash($source);
 }