0

I implemented this (CodeIgniter and HMVC questions) and now my code is breaking. I am getting errors such as

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Auth::$load

Please help!!

im using ci 2.1.4 with hmvc by wiredesign

code:

class MY_Controller extends MX_Controller {

    public function __construct() {
        // do some stuff here that affects all controllers
    }

}

// --------------------------------------------------------------------------
/**
 * Frontend Controller Deals with public pages that dont require auth like website pages etc
 */
class Frontend_Controller extends MY_Controller {

    public function __construct() {
        parent::__construct();
    }

}

// --------------------------------------------------------------------------
/**
 * Backend Controller provides a DRY implementation of auth, ACL etc required by access only pages
 */
class Backend_Controller extends MY_Controller {

    public function __construct() {
        parent::__construct();       
        // Check admin login, etc.
    }

// --------------------------------------------------------------------------
}

/* end file application/core/MY_Controller.php */
Then in another file login.php located in application/controllers

class Login extends Backend_Controller {

// --------------------------------------------------------------------------
    function index() { //check if loggedin already
        $data['required_page'] = 'login';
        $this->load->module('auth');
        $this->auth->load->view('login', $data);
    }
Community
  • 1
  • 1
nsj
  • 45
  • 8
  • Can you post your code and show us what you've tried? – chtenb Jan 19 '14 at 18:01
  • i have edited the code. please check for me. Also when i cal methods from other modules like user/getallusers from user controller in modules/user/controllers/user i get Fatal error: Cannot redeclare class CI in D:\my host\application\third_party\MX\Base.php on line 57 – nsj Jan 20 '14 at 08:23

0 Answers0