Greetings,
Please assume all functions calls are fSession::
Here is the session code that I was using during a user's login, where I allow them to persist their session ("remember me"):
if($rememberMe)
{
fSession::enablePersistence();
fSession::setLength("30 minutes", "1 month");
}
else
fSession::setLength("30 minutes");
fSession::set("uid", $user->_id);
fSession::regenerateID();
When $rememberMe was true, the session was not being persisted - it was still set to expire at the end of the session (30min).
Here is the working code that I'm now using:
fSession::setLength("30 minutes", "1 month");
fSession::set("uid", $user->_id);
if($rememberMe)
fSession::enablePersistence();
else
fSession::regenerateID();
I assume that the issue was caused by enablePersistence() also calling regenerateID(), but I could be wrong. Either way, the code works now.
I'm wondering whether this is expected behavior. If it is, then could we please add a note to the fSession page about order mattering? If not, then I'll open a ticket.
Cheers,
Sam Bisbee