Skip to content

Instantly share code, notes, and snippets.

@sanderpotjer
Created October 27, 2014 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanderpotjer/aa6648216e141afc2749 to your computer and use it in GitHub Desktop.
Save sanderpotjer/aa6648216e141afc2749 to your computer and use it in GitHub Desktop.
Template override for direct logout when using logout menu item in your menu. Place override in templates/nameoftemplate/html/com_users/login/default_logout.php
<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$return = $this->params->get('logout_redirect_url', $this->form->getValue('return'));
$url = JRoute::_('index.php?option=com_users&task=user.logout&' . JSession::getFormToken() . '=1&return=' . $return);
$app->redirect($url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment