mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
8fad8500fe
commit
72e1120168
@ -296,11 +296,12 @@ class Security extends Controller {
|
||||
* 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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user