I'm using CI 3.1.0. On the login page, I set the user info for the session with set_userdata
, after which I set the session redirect page to another controller, but the session data I set got destroyed.
$this->session->set_userdata('admin_id',$data['admin_details']->id);
Try to upgrade your Codeigniter version to the latest one.
There is a session problem with the previous version of Codeigniter.
I recently had the same issue with my project.
After upgrading to a high version the problem got solved.