• Hi,

    I’m creating a news site using wordpress and I want to create a single registration page which will sign the user up to both wordpress and phpbb with the same username and password. I can then easily log both users in with a bridged login form. My problem is this:

    WordPress creates a password for the user, whereas phpbb requires the user to set a password.

    It’s mandatory that both of these password be the same. I suppose another possibility is to just use the wordpress registration form and inject the variables to the phpbb database alongside the wordpress database and skip phpbb’s registration altogether.

    The code I have for my phpbb registration is this:

    <FORM action="<?="https://" . $_SERVER['SERVER_NAME'] . "/forum/profile.php"?>" method=post>
    <h3 align="center"><font size="6">Register</font></h3>
    <div align="center">
    <center>
    <table border="1" width="50%">
    <tr>
    <td width="50%">Username:</td>
    <td width="50%"> <INPUT class=post style="WIDTH: 200px" maxLength=25 size=25 name=username></td>
    </tr>
    <tr>
    <td width="50%">E-mail address:</td>
    <td width="50%"> <INPUT class=post style="WIDTH: 200px" maxLength=255 size=25 name=email></td>
    </tr>
    <tr>
    <td width="50%">Password:</td>
    <td width="50%"> <INPUT class=post style="WIDTH: 200px" type=password maxLength=32 size=25 value="" name="new_password"></td>
    </tr>
    <tr>
    <td width="50%">Confirm password:</td>
    <td width="50%"> <INPUT class=post style="WIDTH: 200px" type=password maxLength=32 size=25 value="" name="password_confirm"></td>
    </tr>
    </table>
    </FORM>

    (I got this code from the phpbb forums – I have yet to clean it up)

    You can see that wordpress and phpbb require the same basic information (Username, email, password [sorta]) to create a user.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Thread Starter kpeatt

    (@kpeatt)

    I wish it was as simple as a search. Unfortunately, it’s not. I’ve done about 2 days worth of searching to see if anyone has come up with an easy method to do this. WPHPBB is a solution that will not work for me. I know how to bridge the logins. While this has been discussed before on the wordpress support forums, there haven’t actually been any responses that don’t point to a simple login bridge or some bastardization of wordpress’s comment system.

    There’s got to be a solution for this that doesn’t involve major hacks.

    Here’s what I’ve been trying to do:

    $query2 = “INSERT INTO phpbb_users (username, user_email, user_password) VALUES (‘$user_login’, ‘#user_email’, MD5(‘$password’) “;
    mysql_pconnect(“db.com”,”username”,”password”)
    or die(“Unable to connect to SQL server”);
    mysql_select_db(“cnoisewp”) or die(“Unable to select database”);
    mysql_query($query2) or die(“Insert Failed!”);

    Beneath wordpress’s query to its own database. My understanding is that this will submit the variables that have been defined by wordpress’s form into phpbb’s database thereby creating a user. However, I always get an “Insert failed!” error. I’m going to try posting my problems on both Sitepoint and PHPBB’s forum to see if they can help me out.

    I’ve possibly been going about this backwards – Maybe I should submit PHPBB’s form data to wp’s user table.

    To be continued..

    Thread Starter kpeatt

    (@kpeatt)

    Well, I’ve got the registrations integrated now. When you sign up for WordPress it automatically creates a user with the same information in PHPBB. Now I just have to fix the “Change password” code so when you change it in one program it automatically changes it in the other. That shouldn’t be too difficult.

    How did you do this? can you please post how you integrated the two. I’m looking to do the same.

    i’m also interested in this if you could share it ??

    Yeah me2 how show us the haxx ??

    I’m also interested in this how did you do this? can you please post how you integrated the two. I’m looking to do the same.

    me 3

    Wilbur has this working the other way if you are interested with registrations in the forum and then the user is created in WordPress. If you are interested, check out:

    https://www.happypoet.com/hackery/wphpbb-login/

    Trent

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Melding PHPBB and WordPress registration’ is closed to new replies.