The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Clearing cookies in logout
Our single sign on facility uses the organization membership system to log users into all the systems including vBulletin.
After a recent upgrade, we are having problems with the cookies that are used to transmit the user information between the systems with vBulletin. Specifically, I need to clear several cookies that were set initially by the membership system. If they do not get cleared, there are problems trying to use that tool to log back in to vBulletin. I tried using a plugin at the hook logout_process but this code appears to do nothing. Code:
setcookie("bb_sessionhash", "", time() - 3600); setcookie("iMISID", "", time() - 3600); setcookie("iMISLogin", "", time() - 3600); setcookie("iMISEmail", "", time() - 3600); setcookie("iMISMember", "", time() - 3600); return false |
#2
|
|||
|
|||
It oesn't look like there should have been any output before the logout_process hook, unless it's a php error message or warning. Have you used the browser developers tools to look at what cookies are being sent with requests?
By the way, you shouldn't use return from a plugin. If there are any other plugins using that same hook, it could stop them from running (but I have no reason to think that's what's causing your current problem). |
#3
|
||||
|
||||
Thank you. The return false is there because that is what I thought was needed to avoid a possible true value from the eval which I understood would terminate the hook. I do most of this monkey style without really understanding it.
It turns out the consultant provides a cookie cleanup in the authentication server and it needs code like this which I have associated with a button in the header template. Code:
<a href="http://net.nawcc.org/iParts/Custom/Logout.aspx?ReturnURL=http://mb.nawcc.org/xplr/login.php?{vb:raw session.sessionurl}do=logout&logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')"> I was hoping that the vB variables were expanded in that url, but maybe they are not. I appreciate any suggestions for proper formation of the above. I want it to go to the server and clear the foreign cookies and return with the job of logging off locally. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|