I am building an application on top of CMSB and have encountered a problem.
I am using WebsiteMembership plugin and have set
$GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL'] =‘ /index.php’ (a page not requiring login)
My internal pages are protected by the plugin and the code of those pages uses some $SESSION variables to keep track of things happening in the app.
When a user logs off from one of the internal pages, however, instead of being redirected to /index.php, he is taken to the current url and an error is generated because the page code can no longer access $_SESSION variable values.
The _websiteLogin_logoff() function has :
$logoffUrl = coalesce(@$_SERVER['HTTP_REFERER'], $GLOBALS['WEBSITE_LOGIN_POST_LOGOFF_URL'], $currentPageUrl, '/');
and so the redirect should be going to my index.php page before looking further to $currentPageUrl.
Hence, I don’t understand this behavior.
Can you tell me what might be going on?
Thanks.