MyBB Community Forums

Full Version: Edit 'mybbuser' cookie by php's setcookie()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am integrating mybb in website.
I can login, logout now. But if i logined via forum, I can not logout in website. Just cannot change 'mybbuser' cookies set by forum.
setcookie('mybbuser', '', -3600, '/');	
Just does not working.

And vice versa, if I login in website
setcookie('mybbuser', $uid.'_'.$loginkey, time()+2419200, '/');
Then i can use forum, but cannot logout in forum, only in site.


How can I edit mybbuser cookie by php's setcookie()?
I found it. It is domain of setcookie() that should be equal to mybb configuration's domain.