english/administrator/components/com_login/controller.php
/**
	 * Method to log in a user.
	 *
	 * @return	void
	 */
Method to log in a user.
@return      void
Method to log in a user . @return void
public function login()
	{
		JRequest::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));
		$app = JFactory::getApplication();
		$model = $this->getModel('login');
		$credentials = $model->getState('credentials');
		$return = $model->getState('return');
		$result = $app->login($credentials, array('action' => 'core.login.admin'));
		if (!JError::isError($result)) {
			$app->redirect($return);
		}
		parent::display();
	}
public function login ( ) { JRequest :: checkToken ( 'request' ) or jexit ( JText :: _ ( 'JINVALID_TOKEN' ) ) ; $ app = JFactory :: getApplication ( ) ; $ model = $ this -> getModel ( 'login' ) ; $ credentials = $ model -> getState ( 'credentials' ) ; $ return = $ model -> getState ( 'return' ) ; $ result = $ app -> login ( $ credentials , array ( 'action' => 'core.login.admin' ) ) ; if ( ! JError :: isError ( $ result ) ) { $ app -> redirect ( $ return ) ; } parent :: display ( ) ; }
Method to log in a user.
Method to log in a user .
// Check for request forgeries.