[eluser]toadi[/eluser]
It seems that I can't find the error. I just try to setup a controller that checks if I'm logged in. If logged in I see the home view else I go to create user page.
But I have problems with the contructs. I'm a bit baffled about CI's implementation of PHP5 and PHP4. Don't really get it how to do it in CI.
MY_Controller.php
Code:
Class MY_Controller extends Controller
{
function __construct()
{
parent::Controller;
}
}
class Auth_Controller extends MY_Controller
{
function __construct()
{
parent::MY_Controller;
$this->load->library('Ion_auth');
if (!$this->ion_auth->loggedin())
{
header('Location: /auth/create_user');
}
}
}
Home.php
Code:
if (! defined('BASEPATH')) exit('No direct script access');
class Home extends Auth_Controller {
function __construct()
{
parent::Auth_Controller();
}
function index() {
$this->load->view('home');
}
}
The error:
Code:
Fatal error: Call to undefined method Auth_Controller::Auth_Controller() in /Applications/MAMP/htdocs/simpleBI/system/application/controllers/home.php on line 10