What's new

Using an existing SQL member d/b wih PHPbb?

Jaz

Ex-Mod
Hello all.

My problem is this...

I have an existing php based web platform running with a MySql members database. I want to integrate phpbb into this platform, but I want to use the existing member database for my phpbb forum.

Is there a hack to do this?

If not, is it just a simple mod?

Do I actually need to link phpbb to my existing member database, or just set up a query to grab the relevant information (ie username and password) from the existing database?

Thanks in advance guys.
 

smcd

Active member
There might be scripts to convert databases for you, or if you're familiar with SQL then you can do it yourself? I'd guess the ease of doing so would depend on how similar the database formats are already and how well versed in such things you are. (I've never used phpbb or any other forums software but can do general tasks in MySQL and PHP)
 

Falcon4ever

Plugin coder / Betatester
Is that current mySQL db using a hash to store passwords of plaintext?

If it's plaintext, you could easily encrypt it to the phpbb format. If not, you can either import all profiles to phpbb and set a random passwordhash and let everyone re-activate their account (using their current e-mail adress).
OR you could modify the password validation part so it looks it up in the old db instead of phpbb. This last approach isn't the nicest because you might get trouble when updating phpbb
 
OP
Jaz

Jaz

Ex-Mod
But the thing is, Falcon, when someone registers on the website with their username and password, I want that automatically to work with the forum as well. I could convert all of the existing members over without too much hassle, but I want the forum to feed from the website's member database so that any new sign-up's from the website will automatically work with the forum.
 
F

fbff

Guest
I can think of three ways to do that:

1. Have a script copy the member row from one database to the other database. The script runs periodically. You might also need another script to do cleanup of deleted members to keep them in sync.

2. When the website creates a new user, change the PHP to also add a row into the forum's user table.

3. Change the forum PHP to read from the website's user table (or change the website PHP to read from the forum's user table).

What I would do is Option 2. I would classify it as a simple mod.

Hope that helps.
 

Falcon4ever

Plugin coder / Betatester
But the thing is, Falcon, when someone registers on the website with their username and password, I want that automatically to work with the forum as well. I could convert all of the existing members over without too much hassle, but I want the forum to feed from the website's member database so that any new sign-up's from the website will automatically work with the forum.

In that case lookup in the phpbb code where the password is being checked and replace it to check in the other DB. Should be doable... ;) or catch me on IRC if you need some help #emulation64
 
OP
Jaz

Jaz

Ex-Mod
I can think of three ways to do that:

1. Have a script copy the member row from one database to the other database. The script runs periodically. You might also need another script to do cleanup of deleted members to keep them in sync.

2. When the website creates a new user, change the PHP to also add a row into the forum's user table.

3. Change the forum PHP to read from the website's user table (or change the website PHP to read from the forum's user table).

What I would do is Option 2. I would classify it as a simple mod.

Hope that helps.

Option 2 sounds like a simple solution, but I was thinking more along the lines of Option 3.

Falcs, I'll try to catch you online for a chat if I can't figure this one out.
 
OP
Jaz

Jaz

Ex-Mod
In that case lookup in the phpbb code where the password is being checked and replace it to check in the other DB. Should be doable... ;) or catch me on IRC if you need some help #emulation64

I don't think it'll be quite as easy as that.

The members db for the website, for example, will only have a username and login, whereas the db for the forum has a lot more fields. :plain:
 

Top