Cann't logoff
5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 5, 2009 (RSS)
By ITI - March 3, 2009
I built a small interface on my dev computer and it worked fine so I moved it to my production computer.
On the production computer It won't logoff when you click the logoff link, just keeps coming back to the main page.
Has anybody encountered this problem?
http://www.CanadianDomainRegistry.ca
ITI Internetworking Technologies Inc.
Re: [glenara] Cann't logoff
By Dave - March 4, 2009
What web server software are you using? There was a problem with an older version of Microsoft IIS where it sometimes would set (or unset) cookies when you're doing a redirect.
If you want to send me CMS and FTP login details to dave@interactivetools.com (email, don't post login details to the forum) I can try and recreate the bug and fix it if it's related to the code.
Hope that helps!
interactivetools.com
Re: [Dave] Cann't logoff - The solution
By ITI - March 4, 2009 - edited: March 4, 2009
So I guess the quick fix is javascript:
if (@$_REQUEST['action'] == 'logoff') {
removePrefixedCookie('username');
removePrefixedCookie('passwordHash');
removePrefixedCookie('randNumber');
removePrefixedCookie('editorStates'); // I also added this.
$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
//header("Location: $url");
echo("<script type='text/javascript'>location.href='$url'</script>");
exit;
}
It appears that on the win 2000 if you don't actually exit the script the new cookie info isn't sent or deleted.
Using javascript to perform the redirection does the trick.
Glen
http://www.CanadianDomainRegistry.ca
ITI Internetworking Technologies Inc.
Re: [glenara] Cann't logoff - The solution
By ross - March 5, 2009
I'll make sure Dave sees the fix you came up with. For now though, I just want to make sure this did in fact get things going for you.
If you are still running into trouble getting logged off, let me know and we'll keep at it :).
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
Re: [ross] Cann't logoff - The solution
By ITI - March 5, 2009
http://www.CanadianDomainRegistry.ca
ITI Internetworking Technologies Inc.