Page 1 of 1

Organizing an old site

Posted: Thu Jan 13, 2005 4:34 pm
by irishmike2004
Greetings:

I was wondering about making a central login with PHP... the site uses PHP BB and already has therefore a MySQL database with login data inside it, is there an easy way to integrate the login (in kind of a portal fashion) for the entire site?

Thanks in advance,

Posted: Thu Jan 13, 2005 4:40 pm
by feyd
you'll need to use the _sid and _data cookies along with their sessions table and _users table they use to work with the user interaction. That's about it. Sounds a lot easier than it can be.

Have a look through login.php and sessions.php.

You will probably want to modify the lang_man.php file and constants file so you can show where they are in the pages...

Posted: Thu Jan 13, 2005 5:35 pm
by Burrito
I have done something similar in the past, but in reverse order. when the user created an account on my site, I also created the phpBB account.

...if you need help on which tables to insert stuff, lemme know.

then on your login action page, you can set the cookie for phpBB so they don't have to log in twice.

Code: Select all

$tempcookie = array('autologinid'=>md5($_POSTї"password"]),'userid'=>$getfiї"user_id"]);
		setcookie("phpbb2mysql_data",serialize($tempcookie),time() + 31536000,"/");
Burr

cool

Posted: Thu Jan 13, 2005 5:38 pm
by irishmike2004
Thanks for the input on this... I think it will work out pretty good with the cookie idea... thx burrito.

Mike