Index: branches/RC/core/kernel/session/session.php =================================================================== diff -u -N -r10974 -r10975 --- branches/RC/core/kernel/session/session.php (.../session.php) (revision 10974) +++ branches/RC/core/kernel/session/session.php (.../session.php) (revision 10975) @@ -639,7 +639,10 @@ $this->Expiration = $this->Storage->GetExpiration(); //If session has expired - if ($this->Expiration < adodb_mktime()) return false; + if ($this->Expiration < adodb_mktime()) { + $this->Destroy(); + return false; + } //Otherwise it's ok return true; @@ -773,13 +776,13 @@ $this->StoreVar('admin', 1); } + $this->SessionSet = true; // should be called before SaveData, because SaveData will try to SetSession again if ($this->Special != '') { // front-session called from admin or otherwise, then save it's data $this->SaveData(); } $this->Application->resetCounters('UserSession'); - $this->SessionSet = true; return true; }