Permalink
Browse files

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
  • Loading branch information...
1 parent 8fd8d87 commit f23921b8154e290fb87bd61b617c85e8e01a93c9 @sminnee sminnee committed Oct 19, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 security/Security.php
View
@@ -296,11 +296,12 @@ public static function Link($action = null) {
* they should go.
*/
public function logout($redirect = true) {
- if($member = Member::currentUser())
- $member->logOut();
+ $member = Member::currentUser();
+ if($member) $member->logOut();
- if($redirect)
- Director::redirectBack();
+ Session::clear_all();
+
+ if($redirect) Director::redirectBack();
}

0 comments on commit f23921b

Please sign in to comment.