coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: ryanhowdy on April 27, 2006, 10:13:54 PM

Title: Universal Login
Post by: ryanhowdy on April 27, 2006, 10:13:54 PM
My site currently has its own user registration system using mysql db, but i want this to work with coppermine... meaning if i login in to my site.. and then go to the coppermine gallery it will automatically log me in.  I would still have people register with copermine and my site seperately but if you login to my site it also logs you into the coppermine gallery also.  Understand?

Can this be done?

When i first thought of this idea i thought i could just put into a session everything coppermine needed (username & pass)... but the code is way to complex and i can't figure out where coppermine even authenticates users.   Can my idea even be done?  At first i thought this would be easy... but now... i don't know

this is a lot harder to explain then i thought
Title: Re: Universal Login
Post by: Nibbler on April 27, 2006, 10:21:40 PM
That's what the bridging system is for. Look at the existing bridge files and modify one of the simpler ones to suit your own setup.
Title: Re: Universal Login
Post by: ryanhowdy on April 28, 2006, 04:31:59 PM
here is the table i am using for my login script...  how can i bridge this with cpg? 

table name (fcms_users)

   userid  int(25)     No    auto_increment             
   fname  varchar(25) latin1_swedish_ci   No                 
   lname  varchar(25) latin1_swedish_ci   No                 
   email  varchar(50) latin1_swedish_ci   No                 
   birthday  date     No  0000-00-00               
   address  varchar(50) latin1_swedish_ci   No                 
   city  varchar(50) latin1_swedish_ci   No                 
   state  char(2) latin1_swedish_ci   No                 
   zip  int(5)     No  0               
   username  varchar(25) latin1_swedish_ci   No                 
   password  varchar


bridging allows you to only use a different user table correct?  the rest of the info stored in cpg tables will stay the same right?  essentially i just want to use this one table(fcms_users) for all my other scripts too
Title: Re: Universal Login
Post by: Nibbler on April 28, 2006, 04:36:36 PM
Yeah, Coppermine allows all user related functions to be taken over by other software. You can specify the table's fields names near the top of the file and provide authentication functions further down.