2 forums with same users

Discussion forum for MOD Writers regarding MOD Development.
Locked
complexxLT
Registered User
Posts: 16
Joined: Wed Jun 01, 2011 12:06 pm

2 forums with same users

Post by complexxLT » Wed Jun 01, 2011 12:07 pm

Support Request Template
What version of phpBB are you using? phpBB 3.0.8
What is your board's URL? forum.pupils.lt swtor.pupils.lt
Who do you host your board with? myself
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? Yes
Is registration required to reproduce this issue? No
What MODs do you have installed? wowhead-tooltips on forum.pupils.lt
none on swtor.pupils.lt
What styles do you currently have installed? subsilver2
What language(s) is your board currently using? EN LT
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
When did your problem begin? After I installed second phpbb forum and made some tables to be used by 2 forums
Please describe your problem. I am trying to use 2 forums with single user database.
I made changes for both forums to use same tables "users" and "words", "bans" and "disallow".
But whenever I create new forum category on one of the forums, second forum stops showing any categories/forums on homepage.

What could I do to fix this? Do I need to share some additional tables?
Generated by SRT Generator ($Rev$)

edit: If I login to forum "B" with other account then I used to create new forum in forum "A" I can see categories and forums perfectly, but if I login to forum "B" with the same account I used to create new forums/categories on Forum "A", I can no longer see any categories or forums on forum's "B" home (but I can still see them in forum management).

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51863
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: 2 forums with same users

Post by Brf » Wed Jun 01, 2011 2:38 pm

The user_permissions field in the phpbb_users table is a cache of that user's permissions. When you are sharing a users tables like that, you are overwriting the permissions from one board with the permissions from the other board. The cleanest way to fix that is to use a separate user_permissions column for each of your boards. You would need to find all of the instances of "user_permissions" in the PHP code and replace it with your new columns.

complexxLT
Registered User
Posts: 16
Joined: Wed Jun 01, 2011 12:06 pm

Re: 2 forums with same users

Post by complexxLT » Thu Jun 02, 2011 11:42 am

Anyone with experience can give me some tips which files I should edit (where this column is used)?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51863
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: 2 forums with same users

Post by Brf » Thu Jun 02, 2011 2:40 pm

Doing a file search for "user_permissions":

includes/auth.php
includes/functions_privmgs.php
includes/functions_user.php
includes/session.php
includes/acp/acp_permissions.php
includes/acp/auth.php
includes/ucp/ucp_remind.php

Locked

Return to “[3.0.x] MOD Writers Discussion”