Create a gist now

Instantly share code, notes, and snippets.

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