BUGFIX #5627 Clear session on logout

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108515 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-07-26 06:44:40 +00:00 committed by Sam Minnee
parent 8fad8500fe
commit 72e1120168

View File

@ -296,11 +296,12 @@ class Security extends Controller {
* they should go. * they should go.
*/ */
public function logout($redirect = true) { public function logout($redirect = true) {
if($member = Member::currentUser()) $member = Member::currentUser();
$member->logOut(); if($member) $member->logOut();
if($redirect) Session::clear_all();
Director::redirectBack();
if($redirect) Director::redirectBack();
} }