
September 18th, 2003, 07:53 PM
|
|
Junior Member
|
|
Join Date: Dec 2002
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Problems integrating two user databases and session systems
Hey everybody.
I've been working with a client adding features to his website. Over the past few months, we've added a registration system and an array of membership features. His forum, which is running phpBB, is running on a separate database.
Here's the scenario:
Main site - "subscribedUsers" table contains all user information -- uses sessions/cookies system
Forum - "phpbb_users" table contains all user information -- uses sessions/cookies system
As a quick and dirty solution, we have phpBB create a new forum user and associate the forum user_id with the site user_id in a forum_id field.
In the header of the page, we're including /phpBB2/common.php and defining IN_PHPBB. We use the session_pagestart() and init_userprefs() functions. On login, we use the same process that phpBB does to login the forum user at the same time.
We run into problems in a few places. I'll outline them here:
- When you go from site -> forum -> site, the session is lost. However, the forum user remains logged in.
- When you try to log out from the forum, it doesn't budge.
- The append_sid() function stops working in both the site and forum.
Ideally, we want to create a system in which a user logs in from the main website, and is seamlessly logged into the forum using their forum user_id. We want the session to remain constant at all times, even when going from site -> forum -> site. Finally, we want the logout in the forum to work as usual.
I'm sure this has been solved in the past. Any ideas?
|