Forums integrator v. 1.1

Requirements: PHP5 (PHP4 is also possible, see below), installed punBB or phpBB
Author: Piotr Malinski, www.english.rk.edu.pl, riklaunim@gmail.com

This classes can asses punBB and phpBB data about users. You can check if user is logged in, register, login and logout users. You can use these classes to create a script which will use punbb/phpbb user system or to integrate other scripts that have their own user system with forums.

-
phpBB
punBB
Start class
$x= new phpbb('patch/to/phpbb/'); $x= new punbb('patch/to/punbb/');
eval(
$x->set_define());
$x->set_variables($pun_user, $pun_config);
Check login
Returns true if you are logged in, false if not
$x->check_login(); $x->check_login();
Logout
Logouts current user
$x->logout(); $x->logout();
Login
Login user based on suplied password and login
$x->login($login, $pass);

on success returns an array of loggedin user
$x->login($login, $pass);
Register
Registers a new active account
$x->register($login, $pass, $email);
You may pass optional 4th argument - 0
to make the account inactive (but the activation mail won't be send)
$x->register($login, $pass, $email);
Is Admin, Is User ?
Returns True if current user is admin/user, False if not.
$x->is_admin();
$x->is_user();
$x->is_admin();
$x->is_user();

punBB EXTRAS

- User/Forum data: after starting the class you have access to arrays: $pun_user - contains data about current user and $pun_config - forum settings.
- Login form: $x->login_form(); - shows a login form which points to punBB login page, will redirect to the current page.
- Database access: $x->query($sql); - execute a SQL query, if SELECT will return an assoc array.

phpBB EXTRAS

- Forum data: $x->board_config(); - returns an array with general forum data
- User data: $x->get_user_data(); - returns an array with data about current user.

IPB - for a integrating class for Invision Power Board check IPB SDK.