HMVC | Undefined property: $session | $this->session is null |
[eluser]oukarai[/eluser]
hi i got this erro message: A PHP Error was encountered Severity: Notice Message: Undefined property: Login::$session Filename: controllers/login.php and my login control is login.php class Login extends CI_Controller { function is_logged_in() { $is_logged_in = $this->session->userdata('is_logged_in'); //<=here if(!isset($is_logged_in) || $is_logged_in != true) { echo 'You don\'t have permission to access this page.'; die(); } } } and my site control is class Site extends CI_Controller { function __construct() { parent::__construct(); modules::run('login/is_logged_in'); } function members_area() { $this->load->view('logged_in_area'); } } while its only one part of the source i access http://localhost/hmvcExample/index.php/s...mbers_area the error message is showed i haved autoload libraries session help!!! |
Welcome Guest, Not a member yet? Register Sign In |