Welcome Guest, Not a member yet? Register   Sign In
Can Not extends Core Controller
#1

[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!!";
}



Messages In This Thread
Can Not extends Core Controller - by El Forum - 06-18-2012, 10:58 AM
Can Not extends Core Controller - by El Forum - 06-18-2012, 11:25 AM
Can Not extends Core Controller - by El Forum - 06-18-2012, 11:31 AM
Can Not extends Core Controller - by El Forum - 06-18-2012, 11:36 AM
Can Not extends Core Controller - by El Forum - 06-18-2012, 12:23 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 01:33 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 01:57 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 02:00 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 02:05 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 02:07 PM
Can Not extends Core Controller - by El Forum - 06-18-2012, 03:29 PM
Can Not extends Core Controller - by El Forum - 06-19-2012, 05:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB