rendered paste body<?php
include('include/define.php');
include('include/classes/controller.class.php');
$controller = new Controller();
$controller->session->start();
if(isset($_SESSION['auth'])){
$controller->auth = $_SESSION['auth'];
}
print_r($_SESSION);
echo $controller->auth->user_auth;
/*
Current Problem: Working on maintaining user_auth state and access control's accross controllers.
Solution: Sessions?
$this->auth->access('admin', 'carrier', 'residential', 'default');
*/
$class_name = $controller->uri->segment(1);
$class_name = empty($class_name) ? 'Index' : $class_name;
$method_name = $controller->uri->segment(2);
$method_name = empty($method_name) ? 'Index' : $method_name;
require_once($controller->path->build('controller', $class_name));
if(class_exists($class_name))
{
$controller = new $class_name();
/* START FAIL HERE */
if(isset($_SESSION['auth'])){
$controller->auth = $_SESSION['auth'];
}
/* END FAIL HERE */
if(method_exists($controller, $method_name)){
call_user_func_array(array(&$controller, $method_name), array_slice($controller->uri->request_args(), 3));
} else {
$controller->load->view('404');
}
} else {
$controller->load->view('404');
}
?>