BUGFIX #5627 Clear session on logout (from r108515)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112758 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 00:47:05 +00:00
parent 8fd8d87de4
commit f23921b815

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();
} }