mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Session::destroy() should make use of setcookie() to remove the cookie from the user, unsetting the superglobal doesn't unset from the browser
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91045 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
898f5605df
commit
f80d5edbcb
@ -224,7 +224,10 @@ class Session {
|
|||||||
*/
|
*/
|
||||||
public static function destroy($removeCookie = true) {
|
public static function destroy($removeCookie = true) {
|
||||||
if(session_id()) {
|
if(session_id()) {
|
||||||
if($removeCookie) unset($_COOKIE[session_name()]);
|
if($removeCookie) {
|
||||||
|
setcookie(session_name(), '');
|
||||||
|
unset($_COOKIE[session_name()]);
|
||||||
|
}
|
||||||
session_destroy();
|
session_destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user