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 () );
Stumble it!



April 29th, 2008 at 12:23 pm
is it possible to get Login and Logout added to the class?
Thanks for what there is so far
April 30th, 2008 at 8:38 pm
Thanks for providing such a useful resource. I was looking for something like this.
May 28th, 2008 at 12:30 pm
Wow great stuff!.. I agree with 1st poster totaly…
Keep it going man!
July 7th, 2008 at 3:16 am
does anyone know how to automactically set auto login
July 7th, 2008 at 4:16 am
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?
July 7th, 2008 at 5:56 pm
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
July 18th, 2008 at 11:50 pm
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
August 3rd, 2008 at 8:01 pm
I’ve recently joined and wanted to introduce myself
September 25th, 2008 at 12:15 am
Hi all!
Excellent site with fantastic references and reading…. well done indeed…!
Excellent forum, added to favorites!
Thank you!