[eluser]qpixo[/eluser]
I'm trying to extend core Controller but it doesn't work after I upgraded CI to version 2.1.1
I can't see the display TEST log in, it's a blank page
Does anyone know how to fix that issue?
in direction application/core:
Code:
class MY_Controller extends CI_Controller {
// Defined a global user to all View
protected $user;
// Constructor
public function __construct() {
parent::__construct();
// Check if is member
if($this->ion_auth->is_group('members')) {
$data->user = $this->ion_auth->user()->row();
$this->user = $data->user;
// Load user to every Views
$this->load->vars($data);
} else {
redirect('/');
}
}
}
Then I extend this base controller in application/controllers/members
Code:
class Dashboard extends MY_Controller {
// Constructor of Dashboard
public function __construct() {
parent::__construct();
echo "TEST log in!!";
}