Skip to content

Instantly share code, notes, and snippets.

@sanderpotjer
Created October 27, 2014 11:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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