예제 #1
0
 /**
  * Confirm Double Optin
  *
  * @param \int $mail
  * @param string $hash Given Hash String
  * @return void
  */
 public function optinConfirmAction($mail, $hash)
 {
     $this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__ . 'BeforeRenderView', array($mail, $hash, $this));
     $mail = $this->mailRepository->findByUid($mail);
     if (Div::checkOptinHash($hash, $mail)) {
         if ($mail->getHidden()) {
             $mail->setHidden(FALSE);
             $this->mailRepository->update($mail);
             $this->persistenceManager->persistAll();
             $this->forward('create', NULL, NULL, array('mail' => $mail, 'hash' => $hash));
         }
     }
 }