mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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.
|
* 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user