[eluser]Mark75[/eluser]
Hi,
i just installed HMVC in a blank Codeigniter Installation. Everything worked fine until i wanted to include my auth-Controllers. Perhaps someone has an idea what is going wrong?
I created the file MX_Controller in /libraries with the following source:
Code:
<?php if( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Public_Controller extends Controller {
function Public_Controller()
{
parent::Controller();
$this->data->user = $this->auth->get_user($this->session->userdata('user_id'));
}
}
This is my welcome-Controller (already working in module-directory)
Code:
<?php
class Welcome extends Public_Controller {
function Welcome()
{
parent::Public_Controller();
}
function index()
{
$this->load->view('welcome_message');
}
}
When i reload my page i get the following errors:
Code:
Undefined property: CI::$data
Filename: libraries/Controller.php
Line Number: 377
Indirect modification of overloaded property Welcome::$data has no effect
Filename: libraries/MX_Controller.php
Line Number: 8
I think that is has something to do with the __get function in Controller.php and my PHP-Version (currently 5.2). I just cant figure out what?
$this->data->user in Public_Controller is FALSE when no user is logged in.
Any help would be greatly appreciated
Mark