[eluser]Unknown[/eluser]
Hi all,
I'm trying to use the core session library function from within a new library within the application folder. Even though the session library is included on the autoload array (
$autoload['libraries'] = array('database', 'session');), it does not seem to be recognized from within a new controller class within the application/libraries folder.
The following is the constructor for my new library (saved under application/libraries/My_Foobar.php)
Code:
class MY_Foobar extends CI_Controller {
private $CI;
public function MY_Foobar() {
parent::__construct();
$this->CI = & get_instance();
$this->CI->load->library('session');
}
public function is_logged_in(){
}
}
When i try to use the functions within the session library from the new controller, i get the following error:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: MY_Foobar::$session