How to Manage Multiple Web App Logins with PHP and MySQL?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RMWChaos
Forum Newbie
Posts: 1
Joined: Tue Feb 09, 2010 5:34 pm

How to Manage Multiple Web App Logins with PHP and MySQL?

Post by RMWChaos »

I'm very new to PHP and MySQL; so thanks in advance for taking the time to read this and respond. I hope I've posted in the appropriate forum.

My hosting provider offers multiple web apps to add to sites, and they very kindly manage all the database setup in the proces. It's all automated, so there's no special requests or I would have asked them to handle this issue for me (actually, I did ask them, and they said "good luck"). Thanks guys. :? Each of these apps has its own user authentication form, system, and MySQL database.

Now I'm sure you saw this coming and have heard it asked a thousand times before, how do I manage all those logins so my users only have to register/login once?

Surprisingly, I've found very little information on the subject. There was this one post: viewtopic.php?t=105905 and it told me basically what I feared to hear--create a single user database and point each of the apps to the new database.

At this stage, that's probably what I'm going to end up doing, but before I delve into messing with the code of applications I have very little insight to, I thought I'd run this by you smart folks first.

The specific apps I'm dealing with are phpBB, phprojekt, mantis, and wordpress. In addition, I'll probably have project members only (as opposed to general public) access to some pages and an app for file upload/dowload management. The general public will only see a few open pages and have access to phpBB. Only project members will have access to the secured pages and apps.

So here are my thoughts:

1) I can leverage off of one of the user management database tables from one of the installed apps and point the other apps to that
2) I can create a new table with all the necessary user fields for each app, then point each app to that and delete the old tables once I've migrated over the existing users
3) I can use yet another app like vAuthenticate or PHP User Class to manage the logins of all the different apps <-- does such a beast really exist, or am I misreading these apps' capabilities?
4) Something else I haven't even thought of yet...

At the moment, I'm leaning towards leveraging off of phpBB as the primary login database because of its user group options--I can set certain users to a new "project members" group and check for that when granting access to other apps and pages. But just a quick glimpse inside of phpBB's MySQL schema had me cowering in fear under my desk. I would have to modify the user registration process and sessions to take into account the necessary fields and data that are required by the other apps as well, but the phpBB EULA says customize your themes all you want, just don't mess with the code, man. So that'll be a fun issue to get around.

Your feedback is greatly appreciated!

Thanks,

-RMWChaos
Post Reply