Posted by Amedee on December 16, 2007 at 3:33pm
Hello,
I have an existing Drupal5 site with 10 000 users, and an existing Phpbb2 forum with 5 000 users.
There is a partial overlap between the site and the forum: I guesstimate that at least 3 000 users are in both databases, but not always with the same username, password, email and certainly not with the same id.
I would like to integrate both websites, find some way to make all site users also forum users and vice versa.
But I wouldn't even know where to start.
My case is different from most cases I read about, because I won't be starting from scratch.
Any ideas?
Categories: phpbb Tik
Comments
This one is pretty juicy ;)
This one is pretty juicy ;) I essentially did this 4 years ago, when I merged a postNuke and a PHP Nuke site, both of which were using phpBB bridges, into a Drupal database.
Basically you need two scripts:
1) Offset all user ids in one database to avoid collisions.
2) Code to figure out who gets to keep what username.
3) To correct the username / ids on material posted by a user who has had his user id replaced to avoid collission. This should reuse code from 1)
Hints for 2)
You need to take an iterative approach and try to get rid of as many overlaps as possible, so that there are only a few collisions left that you have to resolve manually. Start by comparing email addresses. If the same email address is in both databases, use the username and password of the older record and make a note of the user id you're going to delete. Then go back and replace all occurences of the old user id with the new one. Now do the same with usernames. Hopefully you should be left with less than 100 to match manually, some of which you can guess... the others will just have to email you when the site returns.
The really juicy part is
The really juicy part is this:
The ISP of most of the users is Telenet (Belgian ISP).
Its customers used to have @pandora.be email adresses but since a few years they switched to @telenet.be addresses.
The old addresses can still be used.
Phew, I will first have to change all @pandora.be addresses to @telenet.be...
I don't think that should be
I don't think that should be a challenge, just throw in an if-check that chops off @telenet.be and @pandora.be before doing the comparison.
( I would not do this stuff directly in SQL, you'll want to be able to rerun the script easily + make adjustments . )