I'm using tank auth for my project but while working the session expires unexpectedly.
public function __construct()
{
parent:: __construct();
$this->load->model("stulib");
$this->load->library("Gen");
$this->load->model('tank_auth/users','users');
$this->load->library('tank_auth');
$this->title='Angel';
$this->user_id=$this->tank_auth->get_user_id();
$this->school_id=$this->users->get_school();
$this->school_name=$this->users->get_school_name($this->school_id);
$this->yesterday=$this->studentlib->yesterday();
if(!$this->tank_auth->is_logged_in())
die("No access rio!");
}
That's my controller. I check is_logged_in only there at the constructor for the controller.
EDIT:
- I'm storing session in database
- I'm not using any ajax request
- I use twitter bootstrap framework