Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Attempt to resolve #29, fixing logout redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Feb 16, 2016
1 parent 595c35d commit 0b04c5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Controller/Component/UserToolComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class UserToolComponent extends Component {
],
'logout' => [
'successFlashOptions' => [],
'successRedirectUrl' => '/',
'successRedirectUrl' => null,
],
'verifyEmailToken' => [
'queryParam' => 'token',
Expand Down Expand Up @@ -566,6 +566,9 @@ public function logout($options = []) {
return $this->_controller->redirect($this->_controller->referer());
}

if (is_null($options['successRedirectUrl'])) {
$options['successRedirectUrl'] = $Auth->logout();
}
return $this->handleFlashAndRedirect('success', $options);
}

Expand Down

0 comments on commit 0b04c5a

Please sign in to comment.