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:



