Only redirect on logout if we're not already redirecting

This commit is contained in:
Simon Welsh 2013-06-27 09:49:10 +12:00
parent bcc09deb08
commit 1d5ac5876b

View File

@ -346,7 +346,9 @@ class Security extends Controller {
$member = Member::currentUser();
if($member) $member->logOut();
if($redirect) $this->redirectBack();
if($redirect && (!$this->response || !$this->response->isFinished())) {
$this->redirectBack();
}
}