mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Fix logout form return destination
This commit is contained in:
parent
4aed34ddb0
commit
01b41ac1a0
@ -114,13 +114,15 @@ class BetterNavigatorExtension extends DataExtension
|
||||
|
||||
// Add other data for template
|
||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||
$logoutForm = LogoutForm::create($this->owner)->setName('BetterNavigatorLogoutForm');
|
||||
$logoutForm->Fields()->fieldByName('BackURL')->setValue($this->owner->Link());
|
||||
$bNData = array_merge($nav, [
|
||||
'Member' => $member,
|
||||
'Stage' => Versioned::get_stage(),
|
||||
'Viewing' => $viewing, // What we're viewing doesn't necessarily align with the active Stage
|
||||
'LoginLink' => Controller::join_links(Director::absoluteBaseURL(), Security::config()->login_url, $backURL),
|
||||
'LogoutLink' => Controller::join_links(Director::absoluteBaseURL() . Security::config()->logout_url, $backURL),
|
||||
'LogoutForm' => LogoutForm::create($this->owner)->setName('BetterNavigatorLogoutForm'),
|
||||
'LogoutForm' => $logoutForm,
|
||||
'EditLink' => $editLink,
|
||||
'Mode' => Director::get_environment_type(),
|
||||
'IsDeveloper' => $isDeveloper
|
||||
|
Loading…
Reference in New Issue
Block a user