Logoff Re-Direct Doesn't Work

By Perchpole - February 10, 2015

Hello, All 

I've just noticed that the post logoff redirect doesn't work. I've tried a couple of experiments and each time I remain on exactly the same page as the logoff link.

I've even gone so far as to hard code the entry on line 184 of the websiteMembership.php - but to no avail.

From this...

$logoffUrl = coalesce(@$_SERVER['HTTP_REFERER'], $GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL'],  $currentPageUrl, '/');

to this...

$logoffUrl = coalesce(@$_SERVER['HTTP_REFERER'], '/index.php');

The user is logged out successfully but remains on the same page.

For the record I've checked my code and the "...getPrefixedCookie('lastUrl')..." code is deactivated on all pages.

What's wrong?

:o(

Perch

By Perchpole - February 10, 2015

Update -

After several more tests I've narrowed the problem down to $_SERVER['HTTP_REFERER']. If this remains in the code on line 184 the logoff action simply leaves the user on the same page.

However, if I change the code to this...

$logoffUrl = coalesce($GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL']);

...it works as expected.

:oS

Perch

By Deborah - March 10, 2015

Hi, Claire.

I experienced the same WSM issue, but Perch's suggestions got things working for me. (Thanks so much, Perch!)

~ Deborah