Logoff Re-Direct Doesn't Work

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

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 claire - February 11, 2015

Hi Perch - thanks for this. I'll take a look at the WSM code and see if there's a reason why this doesn't work as intended.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/