english/components/com_users/controllers/user.php
/**
	 * Method to log out a user.
	 *
	 * @since	1.6
	 */
Method to log out a user.
Method to log out a user .
public function logout()
	{
		JRequest::checkToken('default') or jexit(JText::_('JInvalid_Token'));
		$app = JFactory::getApplication();
		$error = $app->logout();
		if (!JError::isError($error)) {
			$return = JRequest::getVar('return', '', 'method', 'base64');
			$return = base64_decode($return);
			if (!JURI::isInternal($return)) {
				$return = '';
			}
			$app->redirect(JRoute::_($return, false));
		} else {
			$app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
		}
	}
public function logout ( ) { JRequest :: checkToken ( 'default' ) or jexit ( JText :: _ ( 'JInvalid_Token' ) ) ; $ app = JFactory :: getApplication ( ) ; $ error = $ app -> logout ( ) ; if ( ! JError :: isError ( $ error ) ) { $ return = JRequest :: getVar ( 'return' , '' , 'method' , 'base64' ) ; $ return = base64_decode ( $ return ) ; if ( ! JURI :: isInternal ( $ return ) ) { $ return = '' ; } $ app -> redirect ( JRoute :: _ ( $ return , false ) ) ; } else { $ app -> redirect ( JRoute :: _ ( 'index.php?option=com_users&view=login' , false ) ) ; } }
Method to log out a user.
Method to log out a user .
// Perform the log in. // Check if the log out succeeded. // Get the return url from the request and validate that it is internal. // Redirect the user.