Index: branches/RC/core/kernel/session/session.php =================================================================== diff -u -N -r11386 -r11428 --- branches/RC/core/kernel/session/session.php (.../session.php) (revision 11386) +++ branches/RC/core/kernel/session/session.php (.../session.php) (revision 11428) @@ -398,6 +398,8 @@ var $SID; + var $CachedSID; + var $SessionSet = false; /** @@ -641,7 +643,9 @@ //If session has expired if ($this->Expiration < adodb_mktime()) { $this->Destroy(); - return false; + + // when Destory methods calls SetSession inside and new session get created + return $this->SessionSet; } //Otherwise it's ok @@ -734,7 +738,7 @@ */ function setSID($new_sid) { - $this->SID=$new_sid; + $this->SID = $this->CachedSID = $new_sid; $this->Application->SetVar($this->GETName,$new_sid); } @@ -853,8 +857,11 @@ { $this->Storage->DeleteSession($this); $this->Data = new Params(); - $this->SID = ''; + $this->SID = $this->CachedSID = ''; + $this->SessionSet = false; + if ($this->CookiesEnabled) $this->SetSessionCookie(); //will remove the cookie due to value (sid) is empty + $this->SetSession(true); //will create a new session, true to force }