How to integrate phpbb forum login

I have had to install phpbb forum on a website that already had a user table and I want to…

Settembre 17, 2010

Author

PHP expert. Wordpress plugin and theme developer. Father, Maker, Arduino and ESP8266 enthusiast.

Comments on “How to integrate phpbb forum login”

18 thoughts

  1. ramdhan84 ha detto:

    i’ve found a problem .. Fatal error: Call to undefined function execute_row() when i’m trying to login.
    what is execute_row() ??

    Thx.
    Ramdhan

  2. ramdhan84 ha detto:

    Nevermind … I’ve found the problem

  3. Here's one ha detto:

    This looks like it’s pretty happening.
    http://svmods.com/facebook-connect-for-phpbb.html
    Haven’t tried it yet, but it looks like it works on the guy’s demo site.

  4. Dave ha detto:

    Does this handle checking for an existing user by username/email address?

    I had a quick look through it but couldn’t see any reference to it.

    Cheers,

    Dave

  5. albirea-dintilor ha detto:

    Produse Albire Dinti

    Albiti-va dintii rapid si eficient cu gama Crest Whitestrips. Veti obtine un zambet alb si stralucitor in numai 3 zile.

  6. Soulast ha detto:

    i love your tutorial but im having big time problem
    Is any1 know how to solve that error:

    Fatal error: Call to a member function sql_query() on a non-object in \forum\includes\cache.php on line 51

    ??
    It is always showing when im trying to login thx for any help in advance

  7. David ha detto:

    General Error
    SQL ERROR [ mysqli ]

    Can’t connect to MySQL server.

    An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

  8. Jamar Phu ha detto:

    Why spend money when you could learn for free ? That is the idea on the internet. Regardless of what you are searching for, the Internet always has an answer for you.

  9. stefano ha detto:

    Buongiorno Giulio.
    Mi permetto di disturbarti, riguardo al tuo post
    – How to integrate phpbb forum login

    siamo un gruppetto di programmatori dilettanti che hanno un proprio sito
    con un proprio sistema di registrazione ed autenticazione.
    scritto da noi e quindi facilmente modificabile e configurabile basato su un db mysql.
    vorremmo appunto integrarlo con un forum

    la mia domanda base era (prima di perdere decine di ore in un lavoro al limite delle nostre capacità)

    – è, secondo te, possibile accedere a phpbb tramite il nostro sistema di login
    utilizzando il tuo sistema, ma PASSANDO i dati dei sottogruppi/forum a cui l’utente può accedere
    ovvero che l’utente A possa partecipare ai sottoforum Sezione1, sezione2
    mentre l’utente B possa accedere ai sottoforum Sezione1 e Sezione3 ecc ecc
    basandoci sui dati del nostro db opportunamente adattati?

    Se sì, partirebbe la seconda domanda: come? :-)
    ma sarebbe già sufficiente sapere di lavorare su un obiettivo possibile!

    Grazie per l’attenzione

  10. Djtale ha detto:

    Hello.

    Thank you for this tutorial. It is exactly what I need.
    But I have one question.

    I have my index.php with the form to login.

    When I log in, the form calls login_member.php in which I have my authentication process with the phpBB3Integration.class included.

    At the end of the authentication, I redirect the user to the index.php page. But if I try to use the variable $user, I have this error “Notice: Undefined variable: user”.

    Do I have to insert another code in index.php ?

    Thank you.

  11. Giulio Pons ha detto:

    Possibile lo è, di sicuro. E forse visto quanto tempo è passato dal vostro commento, l’avete già fatto!

  12. Alberto Fontana ha detto:

    Thanks for the tutorial, very helpful.
    Btw, i found a bug:
    When you insert a new user into phpbb_users table, you must insert the original username in “username” column, but in “username_clean” you must insert the username with all lowercase character. In your script, this doesn’t happen, being the username_clean not converted to lowercase. So, for example, if i create in my register.php script a user with uppercase letters (for example Alberto), the username_clean column will contain “Alberto” insted of “alberto”.
    why is this important? Because if i create a user in my register.php script with username containing some uppercase letter, i will never be able to login into the forum. Don’t ask me why, but it happens.

    How to fix this bug?

    Easy:
    change into phpbbintegration.class.php the following line
    $sql .= “NULL, ‘0’, ‘2’, ‘00000000006xv1ssxs\ni1cjyo000000\nqlc4pi000000\nzik0zi000000’, ‘0’, ‘” . $ip . “‘, ‘” . time () . “‘, ‘$username’, ‘$username’,”;
    with the following two lines
    $username_lower = strtolower($username);
    $sql .= “NULL, ‘0’, ‘2’, ‘00000000006xv1ssxs\ni1cjyo000000\nqlc4pi000000\nzik0zi000000’, ‘0’, ‘” . $ip . “‘, ‘” . time () . “‘, ‘$username’, ‘$username_lower’,”;

    Hope it helped

  13. Wing ha detto:

    The createSqlToAddUserRow needs to escape the fields it’s adding.
    At present, this code is vulnerable to SQL injection.

  14. soesilo ha detto:

    Thanks, but it lacks of these functions:
    -changeUsername() // to change forum’s username
    -deleteUser() // to delete a user upon website user deletion

  15. Chris ha detto:

    i am pretty sure there is bug in filling username_clean in phpBB_users when using capital letters.

    as soon phpBB_users.usernameclean contains capital letters, the user is not recognized (not by phpBB admin, which is really strange), as soon as I manually changed phpBB_users.cleanname (its only the cleanname) to small letters only, everything works.

    you can see it at the bots, the username clean is always small letters.

  16. Michael ha detto:

    Not sure if this is still reviewed, but I have a problem with the login portion. The addition of the user to phpbb works fine, but it will not log them in. I am using version 3. Any thoughts on where the issue might be? I have essentially the exact same code for the login as you mention above. Thanks.

  17. Naung ha detto:

    Hi,
    I integrated phpbb w/ my php site as you instructed. It’s working great but new users who register thru my script are not showing as newest member. That is why I always click Resynchronise statistics in admin panel to show new members. Please advise for my issue.
    I really appreciate for your Integration class.
    Thank you,
    Naung

Comments are closed

Recommended

How to build a spider… uh, well an email scraper

What is a spider? A spider is a program that automatically navigates web pages to find informations. These informations can…

Novembre 26, 2013

Updated version of the the Facebook Connect Tutorial

I’ve written un updated version of the Facebook Connect Tutorial, you can find it in the top menu of Barattalo.it.…

Ottobre 10, 2012

How to capture enter key pressed in a form (JavaScript)

Suppose you have a login form and you want to send the form when user press enter on his keyboard…

Febbraio 16, 2010

The Quantcast CMP broke my sites

A javascript error in CMP blocks my site.

Maggio 19, 2023

WP Gutenberg notes

Collection of notes and thoughts on Wordpress Gutenberg blocks development.

Gennaio 9, 2023