The only thing I can think of, which I really am kinda opposed to doing, (And I know Mr Narff would probably crucify me, lol), is in
MY_Session:ess_regenerate(), create a record in the
ci_sessions table with the necessary data, and have the
MY_Session_database_driver::write() first check to see if the record exists (Instead of just inserting it), if it does, then just update it, if not, then do insert it...
Is there a better way to have the record in
ci_sessions created when the session is regenerated? Preferably right when its destroying the old session?
Edit: Or I could insert the row in the
MY_Session:ess_regenerate() method, and set the
CI_Session_database_driver->_row_exists to TRUE... still not sure i like that approach though
Edit 2: That wont work, because this segment of code in the
CI_Session_database_driver::write() at the top will set it back:
PHP Code:
if ($session_id !== $this->_session_id)
{
if ( ! $this->_release_lock() OR ! $this->_get_lock($session_id))
{
return FALSE;
}
$this->_row_exists = FALSE;
$this->_session_id = $session_id;
}
elseif ($this->_lock === FALSE)
{
return FALSE;
}