1

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
AH.
  • 741
  • 1
  • 12
  • 27

1 Answers1

2

I had a similar problem with Tank Auth and CodeIgniter 2.1 .

You can find detailed explanation and solution here

http://www.hiretheworld.com/blog/tech-blog/codeigniter-session-race-conditions

These links could also help you: http://ellislab.com/forums/viewthread/199753/#962141

http://ellislab.com/forums/viewthread/203821/#951378

St0iK
  • 628
  • 3
  • 10