coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: bole on April 15, 2005, 07:31:04 PM

Title: login system
Post by: bole on April 15, 2005, 07:31:04 PM
i've got a small problem. I made my own page, but I wont tu use this script. the problem is, that I have to register twice and login twice, because I have my own login system.  I've found that eveything is defined in init.inc.php, but I can't use my sistem for it, because I have my login system in one databese, and this script in enother. can you please help me solve this problem?

oh, and sorry abaut my english...
Title: Re: login system
Post by: Nibbler on April 15, 2005, 07:38:32 PM
You need to pick one option:

1) You use your login system as the master and write a bridge for coppermine
2) You adopt coppermine's login system instead of your own - I wrote a mod for this in 'admin functions'
Title: Re: login system
Post by: bole on April 16, 2005, 11:45:55 AM
ok, I would take the first one, but how to do it? I dont know a lot abaut programing (well I have just made forum), so I would like some help here. well the registration wouldn't be the problem, but the login system is. any idea?
Title: Re: login system
Post by: Nibbler on April 16, 2005, 02:50:46 PM
If you have a fairly standard database layout and use cookies to store some id or username then you should be able to adapt one of the existing BBS bridges.
Title: Re: login system
Post by: bole on April 16, 2005, 07:41:05 PM
well I use sessions, cookies just for autologin
but that isnt really that bad idea
Title: Re: login system
Post by: bole on April 17, 2005, 09:42:02 PM
i've made it!
If anyone would have the same problem, here's what I did:
setcookie("cpg132_uid", $user_id, time() + 180,"/");
setcookie("cpg132_pass", md5($pass), time() + 180,"/");
you must give this into your login system, and you would have to login once. oh, and watch out abaut the id