MyBB Community Forums

Full Version: Sharing Users Across Boards
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How much modifications would it take to have two installs of mybb, but that use the same users table, but different threads/posts tables?

Each user would need to have two post counts, one for each copy of mybb and each time a thread is posted on one of the boards, the correct post count would be incremented.

I dont think it would be too hard, would it?
Lol. Yeah it would be hard!! Not only would you have to change almost every db query or insert on the second board, but you'de have to modify several queries on the first board too. This is a huge mod! And something I'll never do!
yea i know a lot of queries would eed changing, but is it theoretically possible? because ive already got a website and im starting up another related one and i ideally want to share the user base so they dont have to register twice.

My boards are already heavily modified so i wouldnt mind if it took me a while, i just wanna know if you rekoned it was actually doable?
Sure it's possible. But it would be stupid. You don't want your members te register again? Then just backup your users table from the first board and add it the content to the users table of the second board. It's that simple.
yea i know i can do that, but the whole idea is to make it so new users dont have to register twice as well.

Although i could copy the users table over and the using the new registration function in integration.php, i could add the new user to the second database as well.
If your on linux, symlink the tables inside the database (not sure if it would work though) but its a lot easier than editing querys because if you need to make two database connects the php scripts can easily get confused unless you write most (if not all) of the querys over.

And you'd probably need to use something like AODB to support the multiple querys.
Sems like a big job for something so littelToungue. But yes it's possible all you have to do is share the user tables if that all your looking for. The two post count things may get tricky!
I've actually done this before, but not with 2 postcounts.
DennisTT Wrote:I've actually done this before, but not with 2 postcounts.
having a combined post count at each board?
Hmm? I had the same users table, so only 1 post count was incremented for the two boards. The post count was the same displayed on both boards.

All I did was something like: replace all '".TABLE_PREFIX."users' with '".USERS_TABLE."' and same with the usergroups table, and private messages with their respective constants then define those constants in global.php. There might have been some other steps, I don't remember them at the moment.