[eluser]SPeed_FANat1c[/eluser]
I have very similar problem. But it only happens when administrator is working. When admin logins then sessions userdata becomes like this:
a:2:{s:8:"username";s:5:"admin";s:12:"is_logged_in";s:1:"1";}
when admin start working, then userdata becomes bigges, it holds filter, offset:
a:4:{s:8:"username";s:5:"admin";s:12:"is_logged_in";s:1:"1";s:19:"objektu_sar_filtras";s:10:"index_ajax";s:6:"offset";s:1:"0";}
BTW session get updated this way every time ajax is called:
Code:
$rodymas = array('objektu_sar_filtras' => 'index_ajax',
'offset' => $offset);
$this->session->set_userdata($rodymas);
It works ok, but then at some time it randomly becomes only
a:2:{s:19:"objektu_sar_filtras";s:10:"index_ajax";s:6:"offset";s:2:"12";}
There isn't username and is_logged_in variable anymore.
I could think maybe it becomes so when I update when call ajax by not updating username and is_logged_in variable. But then it should instatnly log out after ajax call.
Edit:
Found that this actually is not random. Wit the user that has not admin rights it also happens, and yet I found that user becomes not logged in after "back" button in browser is pressed. Not always, but in some controllers. But still in the ci_sessions table user is logged in, but it gets userdata that he ins't logged int. I made a test controller with function to see
Code:
function index()
{
echo $this->session->userdata('is_logged_in').br();
echo $this->session->userdata('objektu_sar_filtras').br();
}
and exactly - he isn't logged in.
So it means that session class thinks that user is not logged, although he is. Why could it be?