MyBB Community Forums

Full Version: Multiple Site Login Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have 3 sites which are currently powered by MyBB, MPSounds, MPSkins and MPScripts.

I want them all to share a central login on a 4th site, MPStuff.

I currently have a file on a test site which redirects to the login on MPStuff, which then redirects back to the original site with the session id as a parameter.

The bit I am now stuck on is getting the original site to read the session info from the MPStuff database, as it's running on the same server. I'm just a bit stuck on what to do next and wondered if anyone had any ideas what i can do?

Thanks for any help.
That sort of integration is quite difficult. You'll need to have intricate and detailed knowledge of how exactly users and sessions are handled on each of the scripts.
I have now got it passing the session ID from MPStuff to the original site, which then reads the MPStuff DB to get the session info, retirve the $uid and get the $user array, now the only problem is actually making mybb think it's logged in, not sure how to do that bit.
What are you trying to modify? You're either going to modify how MyBB handles sessions, or how the external script handles sessions?

On the MyBB side, try looking through inc/class_session.php so that you understand how MyBB handles sessions.
Chances are, session IDs are incompatible across the scripts.
Both sides are MyBB and I'm going to modify either side however it's needed.

I've got the session transfering and being read from the second site, it's just needing to simulate a login now.