MyBB Community Forums

Full Version: External Logout Link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to put a logout link from another site, like I got a subdomain of my domain, which I would like to show a logout button.

It should logout the user from the MyBB forum
Like a link to www.domain.com/logout.php?uid=1 or something like this?
Apologies for bringing an old thread back to life, but I'm keen to know if you found a solution for this problem as I have the same requirement for a website I am creating.

Or can anyone else answer this query.

Thanks
I can't remember if MyBB uses a session table. But if it does, connecting to that database and deleting the user from the session table should work.
logout link is like this : ./member.php?action=logout&logoutkey={$mybb->user['logoutkey']}
Thanks for that.

Just looking through the database and noticed the session table and a corresponding session cookie set by the forum. I think my solution is probably down that route.

Cheers
(2012-01-29, 02:07 PM)ranjani Wrote: [ -> ]logout link is like this : ./member.php?action=logout&logoutkey={$mybb->user['logoutkey']}


Thanks for the info, I'll look at that too.

Cheers
(2012-01-29, 02:07 PM)ranjani Wrote: [ -> ]logout link is like this : ./member.php?action=logout&logoutkey={$mybb->user['logoutkey']}

Question, how do i get this so that users can log out through it... I have tried it as a link and a button, both give me variouse PHP errors

Thanks
^ you have to include global.php file as you are using the code from external file ..
ok, that works... Thanks
Ok, as i said above, it works Big Grin

I was just wondering how to get it to redirect to http://mydomain.com/index.php and not http://mydomain.com/forum/index.php

Thanks