<?PHP

class login_Model{

	var $call_controller = array('login', 'model' => 'models');

	function register_check(){

		$this->login->GET('action=register')->method();

		$this->login->get_register_check_data()->Page('register_check');
	}
	function login(){

		$this->login->GET('action=confirm')->method('confirm');

		if($this->login->confirmed == true){

			$this->login->Language('confirmed');
			return true;
		}
		if(isset($this->login->confirmed) && $this->login->confirmed == false){

			$this->login->Language('cannot_confirm');
			return true;
		}

		if( $this->login->loginCheck() == true ){

			$this->login->sessionActive();
			$this->login->is_temporary()->getFrameworkMessages()->Page('logged');
		}
		else{

			$this->login->Page('login');
		}
	}

	function ajax_login(){

		$this->login->POST('login')->method('ajaxLoginCheck');
	}

	function lostpassword(){

		$this->login->POST('lostpassword')->method();
	}
}
?>