english/administrator/components/com_login/controller.php
/**
	 * Method to log out a user.
	 *
	 * @return	void
	 */
Method to log out a user.
@return      void
Method to log out a user . @return void
public function logout()
	{
		JRequest::checkToken('default') or jexit(JText::_('JInvalid_Token'));
		$app = JFactory::getApplication();
		$userid = JRequest::getInt('uid', null);
		$options = array(
			'clientid' => ($userid) ? 0 : 1
		);
		$result = $app->logout($userid, $options);
		if (!JError::isError($result)) {
			$model 	= $this->getModel('login');
			$return = $model->getState('return');
			$app->redirect($return);
		}
		parent::display();
	}
public function logout ( ) { JRequest :: checkToken ( 'default' ) or jexit ( JText :: _ ( 'JInvalid_Token' ) ) ; $ app = JFactory :: getApplication ( ) ; $ userid = JRequest :: getInt ( 'uid' , null ) ; $ options = array ( 'clientid' => ( $ userid ) ? 0 : 1 ) ; $ result = $ app -> logout ( $ userid , $ options ) ; if ( ! JError :: isError ( $ result ) ) { $ model = $ this -> getModel ( 'login' ) ; $ return = $ model -> getState ( 'return' ) ; $ app -> redirect ( $ return ) ; } parent :: display ( ) ; }
Method to log out a user.
Method to log out a user .