Undefined property: CI::$session

If you are using session in your code then make sure to autoload in config.php file by setting an encryption key. If you don't autoload it then you can load it using $this->load->library('session'). But you must set encryption key in order to autoload or load session in controller functions.

Detailed information here. Working with sessions in codeigniter


plus of the started session, you need to check parent in constructor function or write this code in your constructor: **parent::__construct();**