All pastes #625869 Raw Edit

Miscellany

public text v1 · immutable
#625869 ·published 2007-07-19 07:28 UTC
rendered paste body
<?php
class Login extends Controller
{
	public function Index()
	{
		if($_SERVER['REQUEST_METHOD'] === 'POST'){
			if($this->auth->login($_POST['username'], $_POST['password'])){
				
				// looks to fail here.
				/*
				if(!is_object($_SESSION['auth'])){
					$_SESSION['auth'] = $this->auth;
				}
				*/
				
				$this->load->view('index');
			} else {
				$this->load->view('login');
			}
		} else {
			$this->load->view('login');
		}
	}
	
	public function __destruct()
	{
		session_write_close();	
	}
}
?>