[eluser]WanWizard[/eluser]
The current CI session library doesn't support the option at the moment.
Normally you would use a session timeout value of zero, which on the session cookie means 'valid until the browser closes'.
However, the CI session library says:
Code:
// Set the session length. If the session expiration is
// set to zero we'll set the expiration two years from now.
if ($this->sess_expiration == 0)
{
$this->sess_expiration = (60*60*24*365*2);
}
I solved this by adding this bit of code to my MY_Session library (create it if you don't have one):
Code:
// call the parent constructor
parent::CI_Session();
// reset the session expiration to zero here, to work around the CI
// assumption that a zero value means '2 years', instead of 'end of session'!
$this->sess_expiration = 0;