mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
8fd8d87de4
commit
f23921b815
@ -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…
Reference in New Issue
Block a user