Answer the question
In order to leave comments, you need to log in
I can not deal with the session?
Good afternoon,
I write authorization in codeigniter
, the situation is as follows: I
authorize the user, I display
his session value
[__ci_last_regenerate] => 1441008949
then
if you open the site in the next tab, then the session disappears and the value
[__ci_last_regenerate] => 1441008941 (other)
BUT you
should follow any link - session is restored
Why does it forget the user on the first login?
Answer the question
In order to leave comments, you need to log in
I work on Kohana - this is a branch from code igniter, so I will try to explain how Kohana works.
Your value is rather a session generation timestamp. try putting the user ID into the session using your key. and experiment!
The fact is that there is a config that serves to identify the TTL session.
When a session is created, a session file is created. If the creation time of this file is more than TTL, then this file is considered to be stitched. To avoid a delay, the Session::instance() wrapper always overwrites the session file, updating the key there, which is responsible for the last call to the session.
1441008941 === Mon, 31 Aug 2015 08:15:41 GMT
This is most likely a service tip. Try putting id\login\email in the appropriate keys and dump session.
This is all relevant only if you work within the same domain. If the question is about subdomains, then you need to take into account what Google prompts for the query "one session across subdomains"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question