Jump to content

Archived

This topic is now archived and is closed to further replies.

rho42

Combining database usernames?

Recommended Posts

Hi, I am making a website that will have a marketplace with products to purchase and a phpBB community. I was wondering if there is a way to combine the usernames and passwords from both so users only have to sign up for one and have access to both. Is this possible?

Share this post


Link to post
Share on other sites
I'm guessing that you are using 2 databases.....one for the phpBB and one for the marketplace? If that's the case, why not just add the tables you require for the marketplace application into the the phpBB database? Then you will have one database with all the tables you require to run both applications, and only have to authenicate users once? That's what I would do anyway. :-)

Share this post


Link to post
Share on other sites
Guest footballkid4
I'm fairly unfamiliar with the phpBB authentication...I don't know if they simply encrypt with md5( $pass ), or if it is more complicated, I know IPB uses md5( md5( $pass ) . md5( $salt ) ), but that won't help you here. After you find the authentication method, all you have to do is select from the phpBB tables instead of your tables...

Share this post


Link to post
Share on other sites
[code]
<?php

$pass=md5($_POST['pass']);

$sql=mysql_query("SELECT * FROM phpbb_users WHERE username='$_POST[user]' AND user_password='$pass');

?>
[/code]

Simple

Passwords are encrypted with md5() once

Share this post


Link to post
Share on other sites
If I were you, I'd just have the customers register with phpBB, and have your marketplace script use the phpBB table(s) - don't have any user authentication tables in your marketplace system.

Although, I must say, it may be a bit more trouble than it's worth - all of my experience in integrating databases was not fun at all.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.