Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter

[eluser]katanama[/eluser]
[quote author="jasonlally" date="1355899752"]I was able to find the root cause, but still searching for a solution. I have a core MY_Controller extending CI_Controller. I had switched the Auth controller to extend MY_Controller to take advantage of some template functions I'm using across my controllers. Anyway, when I switch Auth to extend CI_Controller again, everything is fine again. So I guess the key question is what happens to the __get($key) magic function when I extend the core CI_Controller? What is breaking? Do I need to declare something in my constructor for MY_Controller so $CI can get the main instance via get_instance still.

[/quote]

From my understanding : Your problem exist when Auth controller extends your MY_Controller, but not when it extends CI_Controller, true?


If you have a MY_Controller, and it has a constructor, maybe you forgot to invoke
Code:
parent::_constructor()
?

I had problem like yours when I used certain HMVC library.
$data is not visible inside models... that's why I asked wether you're using any HMVC extension and which one.

Before switching to Jens Segers HMVC, when calling any methods in my models, i pass $this as parameter.

In my model methods, I declare the method with the param received as reference.

example :

in controller :

Code:
$this->accounts_model->delete_accounts($this);

in model, when declaring delete_accounts method :

Code:
public function delete_accounts (&$that){
// do something, and :
$that->data->message['status'] = 'delete success' ;
}

I declare my $data as my controller property.

not by declaring in constructor

$this->data = null; or
$this->data = array(), or
$this->data = new stdClass

have you tried debugging using xDebug? follow the code flow...


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 12-19-2012, 12:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB