Integration with PHPBB3 Forum System
The latest incarnation of the PHPBB forum system has been released for a short time now. Unfortunately there is still little in the way of an API for manipulating the user base of the forum system to allow it to synch with an external application.
To this end, we produced a small class that takes care of pushing manipulations to the PHPBB3 forum system.
The functionalities included are:
- Add a user to PHPBB3
- Change users password on PHPBB3
- Disable/ban user on PHPBB3
- Enable/un-ban user on PHPBB3
The class maintains an internal MySQL connection to avoid interfering with your applications connections.
Usage Examples
Add New User:
require (FILE_ROOT . ‘forumIntegration/PHPBB3Integration.php’);
$forum = new Phpbb3Integration ( );
$forum->connect ( BBDBSERVER, BBDBUSER, BBDBPASS, BBDBNAME );
$forum->addNewUser ( $user->getUsername (), $user->getPassword (), $user->getEmailAddress (), $user->getRegistrationIp () );
Change Users Password:
require (FILE_ROOT . ‘forumIntegration/PHPBB3Integration.php’);
$forum = new Phpbb3Integration ( );
$forum->connect ( BBDBSERVER, BBDBUSER, BBDBPASS,BBDBNAME);
$forum->changeUserPassword($user->getUsername (), $user->getPassword ());
Disable User:
require (FILE_ROOT . ‘forumIntegration/PHPBB3Integration.php’);
$forum = new Phpbb3Integration ( );
$forum->connect ( BBDBSERVER, BBDBUSER, BBDBPASS, BBDBNAME );
$forum->disableUser ( $user->getUsername (), $user->getEmailAddress () );
Enable User:
require (FILE_ROOT . ‘forumIntegration/PHPBB3Integration.php’);
$forum = new Phpbb3Integration ( );
$forum->connect ( BBDBSERVER, BBDBUSER, BBDBPASS, BBDBNAME );
$forum->enableUser ( $user->getUsername () );
Related posts:




















is it possible to get Login and Logout added to the class?
Thanks for what there is so far
Thanks for providing such a useful resource. I was looking for something like this.
Wow great stuff!.. I agree with 1st poster totaly…
Keep it going man!
does anyone know how to automactically set auto login
i’m not very good in programming..cz i’m quite new in php..but i have to do this for my class project.. how to use this code actually? do i have to create class or anything?
Hello and thanks for your comments.
@K Reeve: We let them use the forum login directly so we have no plans to do this currently.
@acctman: Sorry no idea – but if you crack it please post a link here
@Fara: You can copy the usage examples pretty much as they are, you can download the source code at the bottom of the post too.
Thanks
Awesome script, been looking all over for this. Only problem im having, one of many, is first of all, after placing the phpbb3integration.php file in the main directory, do i place the add user snippet you have above on my join.php page? any help would be apprec, thanks alot
I’ve recently joined and wanted to introduce myself
Hi all!
Excellent site with fantastic references and reading…. well done indeed…!
Excellent forum, added to favorites!
Thank you!
I have a flash site
i’m looking for the script who makes google adsense with flash.
can you give me the link?
Just installed this – many thanks for creating it. Looks like it will do exactly what I want. However, I ran it and it put the user onto my forum (phpbb3) and I could see it. However I could not log in as this user. Any ideas on what Im doing wrong?
Thanks.
Hi,
I’ve just joined this website
There are some great articles here to learn
I’ve just created a website and am hoping to use these SEO methods
will like to make some new friends along the way
Thanks everyone
i want a design for forum integration system
Very nice app… It would be useful if the AddUser function returned the user_id…
The “username_clean” in this script is incorrect…
In createSqlToAddUserRow “username” & “username_clean” are both given the same value ($username) and it’s possible they are not…