BUGFIX Session::destroy() should make use of setcookie() to remove the cookie from the user, unsetting the superglobal doesn't unset from the browser (from r91045)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92450 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 01:40:50 +00:00
parent 624ddc67cb
commit 460380ecb2

View File

@ -224,7 +224,10 @@ class Session {
*/
public static function destroy($removeCookie = true) {
if(session_id()) {
if($removeCookie) unset($_COOKIE[session_name()]);
if($removeCookie) {
setcookie(session_name(), '');
unset($_COOKIE[session_name()]);
}
session_destroy();
}
}