/**
  * return void
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $uri = $this->request->getInternalArgument('__redirectAfterLogoutUri');
     if (empty($uri)) {
         $this->redirect('index');
     } else {
         $this->redirectToUri($uri);
     }
 }
 /**
  *
  */
 public function logoutAction()
 {
     parent::logoutAction();
     if ($this->request->getFormat() === 'json') {
         $this->response->setHeader('Content-Type', 'application/json', TRUE);
         $this->response->setContent('null');
         throw new \TYPO3\Flow\Mvc\Exception\StopActionException();
     } elseif ($this->request->getFormat() === 'html') {
         $returnTo = $this->getReturnTo();
         $this->redirectToUri($returnTo);
     }
 }
 /**
  * Logs all active tokens out.
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $result = $this->redirectTargetService->onLogout($this->controllerContext);
     if (is_string($result)) {
         // This might be an issue in Neos; when embedding this as a plugin on a login-protected page that is no longer visible after logout.
         // It seems that $this->redirectToUri() does not work, because the parent response is still rendered (which leads to exceptions).
         // So we build our own version of redirectToUri() and die() afterwards to prevent the response bubbling.
         $escapedUri = htmlentities($result, ENT_QUOTES, 'utf-8');
         header('Location: ' . $escapedUri);
         header('Status: ' . 303);
         echo '<html><head><meta http-equiv="refresh" content="' . intval(0) . ';url=' . $escapedUri . '"/></head></html>';
         die;
     } elseif ($result instanceof ActionRequest) {
         $this->redirectToRequest($result);
     }
     if ($result === null) {
         // Default: redirect to login
         $this->redirect('login');
     } else {
         throw new Exception('RedirectTargetServiceInterface::onLogout must return either null, an URL string or an ActionRequest object, but was: ' . gettype($result) . ' - ' . get_class($result), 1464164500);
     }
 }
 /**
  * Logs out a - possibly - currently logged in account.
  * The possible redirection URI is queried from the redirection service
  * at first, before the actual logout takes place, and the session gets destroyed.
  *
  * @return void
  */
 public function logoutAction()
 {
     $possibleRedirectionUri = $this->backendRedirectionService->getAfterLogoutRedirectionUri($this->request);
     parent::logoutAction();
     switch ($this->request->getFormat()) {
         case 'json':
             $this->view->assign('value', array('success' => true));
             break;
         default:
             if ($possibleRedirectionUri !== null) {
                 $this->redirectToUri($possibleRedirectionUri);
             }
             $this->addFlashMessage('Successfully logged out', 'Logged out', Message::SEVERITY_NOTICE, array(), 1318421560);
             $this->redirect('index');
     }
 }
Example #5
0
 /**
  * Logs out a - possibly - currently logged in account.
  *
  * @return void
  */
 public function logoutAction()
 {
     parent::logoutAction();
     switch ($this->request->getFormat()) {
         default:
             $this->flashMessageContainer->addMessage(new \TYPO3\Flow\Error\Message('Successfully logged out.', 1318421560));
             $this->redirect('index');
             break;
     }
 }
 /**
  * return void
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $this->addFlashMessage('Successfully logged out', 'Logged out', Message::SEVERITY_NOTICE);
     $this->redirect('index');
 }
 /**
  * @return void
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $this->redirect('index', 'Landing', NULL, array('loggedOut' => TRUE));
 }
 /**
  * Do logout - will invalidate the account in the login-session and redirect.
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $this->redirect('index', 'quiz');
 }
 /**
  * Logs all active tokens out and redirects the user to the login form
  *
  * @return void
  */
 public function logoutAction()
 {
     parent::logoutAction();
     $this->addFlashMessage('Logout successful');
     $this->redirect('index');
 }