Miscellany
public text v1 · immutable<?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();
}
}
?>