Page 1 of 1

Looking to integrate...

Posted: Thu Mar 14, 2002 10:07 pm
by z00om

I have been around phpBB since the start, and I do use the phpBB2. Anyway, I was thinking that since I am going to re-do my ENTIRE site and also make it "user" based, I should fully integrate my user db with the phpBB. Is there anything special I should know? I realise I'm going to have to find the password encryption algorithm and use that, but on top of all that what else should I know? I appreciate your help! :)


Posted: Fri Mar 15, 2002 1:17 am
by Matthijs
Well... not sure what your users are able to do after being logged in, but you could just copy-paste the entire session/auth functions of phpBB 2.
That would be the easy way. Some people over at are discussing this already I think.

Doing it all by yourself, you only need to look in the users table. user_id, username, password and user_status will probably be the only ones you'll use. The password is 'encrypted' using a MD5 hash. In PHP, just do a md5($clear_txt_password) and match it against the one in the database.

Good luck!

Posted: Fri Mar 15, 2002 2:04 am
by Hades
Or use the session management and auth functions that are already in phpBB ;)

This way it maintains the phpBB coding standards too...

Also it saves you a lot of needless code. Enjoy

Posted: Fri Mar 15, 2002 5:06 am
by z00om
my REAL problem is I need to ADD fields to the DB. That, or I am considering linking each user to a seperate table of information which would make it easier... But I want to add things like News posting rights, download rights, etc... thanks for the help! :)

Posted: Fri Mar 15, 2002 9:34 am
by Matthijs
You'll want to make a different table for that, linking the two by user_id.

Posted: Sat Mar 16, 2002 12:52 am
by z00om
I had just come to that conclusion, thanks for your help! :)

Posted: Sat Mar 16, 2002 1:53 am
by z00om
and heres what I came up with:

Code: Select all

					if( $result = $db->sql_query($sql, BEGIN_TRANSACTION) )
					/* =-=- BEGIN MY MODS -=-= */ 
		/*      ************      */
						$sql = "SELECT user_id FROM users ORDER BY user_id DESC LIMIT 1";
						$result = $db->sql_query($sql);
						$userid = mysql_fetch_row($result);
						$sql = "INSERT INTO users (id,user_id,newsrights,files) VALUES ('','$userid[0]','r','none')";
						$result = $db->sql_query($sql);
		/*      ************      */
					/* =-=- END MY MODS -=-= */