Welcome Guest, Not a member yet? Register   Sign In
CI Session -> can't regenerate id??
#3

[eluser]arbme666[/eluser]
Thanks for the reply.

I just created a new function within Session.php which is just the same as sess_update() but with the following removed from the top and the function renamed to regenerate_id().

Code:
// We only update the session every five minutes by default
if (($this->userdata['last_activity'] + $this->sess_time_to_update) >= $this->now)
{
return;
}

This will regenerate the session id and update users_activity and keep the users data. Just call it by $this->session->regenerate_id();

Hope this helps anyone who wants a new session id when changing sensitive data like login status etc.


Messages In This Thread
CI Session -> can't regenerate id?? - by El Forum - 04-28-2010, 05:20 AM
CI Session -> can't regenerate id?? - by El Forum - 04-28-2010, 06:32 AM
CI Session -> can't regenerate id?? - by El Forum - 04-28-2010, 09:20 AM
CI Session -> can't regenerate id?? - by El Forum - 05-26-2012, 11:07 PM
CI Session -> can't regenerate id?? - by El Forum - 05-27-2012, 11:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB