application/controllers/User.php
/**
	 * This login method only serves to redirect a user to a 
	 * location once they have successfully logged in. It does
	 * not attempt to confirm that the user has permission to 
	 * be on the page they are being redirected to.
	 */
This login method only serves to redirect a user to a
location once they have successfully logged in. It does
not attempt to confirm that the user has permission to
be on the page they are being redirected to.
This login method only serves to redirect a user to a location once they have successfully logged in . It does not attempt to confirm that the user has permission to be on the page they are being redirected to .
public function login()
	{
		if( $this->uri->uri_string() == 'user/login')
		{
			show_404();
		}
		if( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )
		{
			$this->require_min_level(1);
		}
		$this->setup_login_form();
		if( $this->load->get_var('login_error_mesg') )
		{
		$this->output
		->set_status_header(200)
	    ->set_content_type('application/json')
	    ->set_output( json_encode(array('mesg' =>  $this->lang->line('error_login_failed'), 'code' => 0) ))
	    ->_display();
	    die;
		}else{
		$this->output
		->set_status_header(200)
	    ->set_content_type('application/json')
	    ->set_output( json_encode(array('mesg' =>  str_replace('{0}', $this->input->post('login_string'), $this->lang->line('mesg_user_logged')), 'code' => 1) ))
	    ->_display();
	    die;
		}
	}
public function login ( ) { if ( $ this -> uri -> uri_string ( ) == 'user/login' ) { show_404 ( ) ; } if ( strtolower ( $ _SERVER [ 'REQUEST_METHOD' ] ) == 'post' ) { $ this -> require_min_level ( 1 ) ; } $ this -> setup_login_form ( ) ; if ( $ this -> load -> get_var ( 'login_error_mesg' ) ) { $ this -> output -> set_status_header ( 200 ) -> set_content_type ( 'application/json' ) -> set_output ( json_encode ( array ( 'mesg' => $ this -> lang -> line ( 'error_login_failed' ) , 'code' => 0 ) ) ) -> _display ( ) ; die ; } else { $ this -> output -> set_status_header ( 200 ) -> set_content_type ( 'application/json' ) -> set_output ( json_encode ( array ( 'mesg' => str_replace ( '{0}' , $ this -> input -> post ( 'login_string' ) , $ this -> lang -> line ( 'mesg_user_logged' ) ) , 'code' => 1 ) ) ) -> _display ( ) ; die ; } }
This login method only serves to redirect a user to a
 location once they have successfully logged in.
This login method only serves to redirect a user to a location once they have successfully logged in .
// Method should not be directly accessible //echo $this->load->get_var('login_error_mesg'); die; //$this->load->view( 'auth/login_form' );