MyBB Community Forums

Full Version: CANNOT LOGOUT? READ THIS!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
To try and curb the amount of posts regarding logout issues, I am replacing the existing sticky with this one. The previous sticky can be found here. I recommend that your read it if you are still having trouble after following the instructions laid out below.

Why am I unable to logout?
Well, there are three main reasons for this. The first two relate the following error when clicking the "Logout" link:
Quote:Your user ID could not be verified to log you out. This may have been because a malicious Javascript was attempting to log you out automatically. If you intended to logout, please click the Logout button at the top menu.

This means that your Logout link doesn't contain an SID and since MyBB 1.2.8, this is required. There are two possible reasons for this:
1) The board has been updated to a newer version of MyBB but some template information hasn't been updated.
2) You are using a template designed for a version of MyBB older than 1.2.8 and as such, the logout link is also missing the SID component.

A fix for both these issues can be found by following the instructions here to manually update your templates Logout link to contain the SID. Note: You will need to do this for every theme that you use on your forum which does not currently contain an SID link.

If after making the above changes you are still unable to logout and are running MyBB 1.2.10. Please try the following.

The third reason could relate to your cookie settings. Either, the Cookie settings for a forum have been changed so that they no longer correspond to the cookies you have stored so that when you click logout, MyBB is attempting to remove cookies which don't exist.

Or, you have some cookies remaining from a previous session (when the Cookie settings were different) and also a set of cookies for this session (with the new cookie settings). In this case, MyBB will clear your new cookies, but not the old ones so you will appear unable to logout.

In both situations, the best solution is to clear the cookies in your browser.

Please post the following info if you are still having problems:
1) Forum URL
2) What error you are getting
3) What you have done to try to fix this
If you are using MyBB 1.2.8 or later (already have &sid=xxxx in URL)
Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> changeuserbox

Find:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;sid={$session->sid}">{$lang->change_user}</a>
Replace with:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->change_user}</a>

Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> header_welcomeblock_member
Find:
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;sid={$session->sid}">{$lang->welcome_logout}</a>
Replace with:
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>

Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> Index Page Templates --> index_logoutlink

Find:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;sid={$session->sid}">{$lang->index_logout}</a>
Replace:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->index_logout}</a>

If you were using MyBB 1.2.7 or earlier (no &sid=xxxx in URL):
Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> changeuserbox

Find:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->change_user}</a>
Replace with:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->change_user}</a>

Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> header_welcomeblock_member
Find:
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->welcome_logout}</a>
Replace with:
<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>

Admin CP --> Templates --> Modify/Delete --> *expand your template set* --> Index Page Templates --> index_logoutlink

Find:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}">{$lang->index_logout}</a>
Replace:
<a href="member.php?action=logout&amp;uid={$mybb->user['uid']}&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->index_logout}</a>
Thanks for this information!!

Just Upgraded and had this issue, now I have to update my Templates to 1.2.10 logout compatibility
Oke maybe im really a woman but i cant find this code
Looked in my ftp, in my admin, no luck.
Somebody how can help me ??
Maybe in Dutch because my language is dutch
lagulalupis Wrote:Oke maybe im really a woman but i cant find this code
Looked in my ftp, in my admin, no luck.
Somebody how can help me ??
Maybe in Dutch because my language is dutch

Go into your 'Admin CP', scroll naar 'Sjablonen' - 'Doorzoeken' - 'Namen van sjablonen zoeken' en vul de naam in; hoef je nietmeer zelf te zoeken
Je bent de best !!!
Het werkt
Thanks for the help with the log out solution, except I still have a problem.

I don't get that malicious script thingy anymore, it say's I'm logged out, but I'm not.

I've cleared the cookies, many times, so what did I do wrong?
It still says you are logged in after you have cleared your cookies? That would be impossible.
Unless the browser is reading a cache version of the page and keeps rendering the same. If you did cleared your cookies, try pressing CTRL + F5 in your page or deleting the cache of the browser.
Thank you for support. You guys rock!!
Pages: 1 2 3 4 5 6 7 8 9