tags:

views:

248

answers:

5

I have an existing php website with a user system already set up (registration, authentication, lost password, etc.). I've decided that I want to add a message board and integrate it with the existing website: registration on one should register on the other, and similarly with logging in and changing user information.

Is there a good forum that would make such integration easy? It seems that the most common way this is done is simply to abandon the existing user system and use the forum's user system. But this has downsides: you rely on the forum to properly handle security (on the other hand, this could be a benefit) and you are much more tied to this particular forum (more complex to switch forums, forum problems could cause problems with the entire website, more difficult to have forum on a separate server).

What is a good way to approach this?

+3  A: 

Do you have the time and resources to write your own? In my experience, integrating an open-source solution into a pre-existing system can take up more time than creating one from scratch.

mfabish
+5  A: 

If you are going for a stable, popular implementation of forum software, in almost all cases it will be a better idea to use the forum's user authentication rather than your own.

That said, if you are hellbent on using your own authentication system, you could probably keep the two isolated but combined. What I mean is that in the registration system for your own software, call into the forum's registration method. This way, once you register on your website, it will create an account on the forum software as well.

If you wanted to allow one authentication session to authenticate both onto your website and the forum, you would have to load the forum's session information in upon login. Many forum software implementations out there have hook-ins that you can call. SMF, from what I remember, had an API that allowed you to perform many of these tasks.

sohum
+3  A: 

There are a lot of tutorials on how to do it with phpBB

rpSetzer
+2  A: 

I'm not sure how efficient this is, since I really just recommend using your forum's user system for this sort of task, but you can technically store the user's ID in a column/table in your database and reference to it from there.

Furutsuzeru
A: 

You can use the Single Sign On feature of Simple Machines if you wish. This is exactly what you should do to integrate smoothly a software to another one. Alternatives are also Openid, but it's harder to implement.

Lastnico