|Posted: Sun, 2003-09-21 15:04|
I have a website that already has userID/password/permissions DB (in mySQL) I'd like to figure out how to unify Gallery with it such that the users can use their same login info for Gallery as with our other existing tools.
I'm new to PHP (years with Perl) and not much of an OO person either , but a long time code-hack I think I can begin to see where I need to do this, but.....
It would _appear_ that associated with each user are only several pieces of info...
If I can pass all user/login requests to my DB, I can easily fill in and return info for all of these fields. I would then disable all ways from within Gallery for users to modify their info, and/or or an Admin to add/remove users.. I simply want the login to pull from my DB, for the pic owner to associate the ID for a pic with the fullname from my DB. I can handle all of the "admin" side of things (adding/removing users) from our main DB side of things. Hopefully that makes the rest easier since there should be less to change.
Perhaps I can just intercept all access to userdb.dat? Fill in any reads with a call to my DB, and drop any writes on the floor (although hopefully I will remove any way to cause a write)?
Obviously I'm operating on thin understanding of how Gallery works, and in a new language (to me) and in a new coding style (OO). But hey, that just makes it more of a challenge.
One further idea I had, its not very elegant, but if someone would explain the userdb.dat format to me, I could (brute force) generate the file from my DB on a cron job. Very much down my list of how I'd like to do this, but...
I'd appreciate any advice to get me started in the right direction.