I needed a way to add users directly from the phpBB2 administrative interface. This is a quick and dirty, language-dependent (english only) mod for phpBB2 to allow administrators to add new users.

It's easier to do it this way than to manually register new users through the profile.php registration method, and if you've modified phpBB2 to disallow access by anonymous users, registration is more difficult with the normal method.

theory of operation

A new file (admin_user_new.php) was created and placed in the phpBB2/admin directory. phpBB2 somehow scans the directory looking for new functions and finds the file and adds it as an entry in the administrative menu.

admin_user_new.php was created by extracting the code that inserts a new user into the database from profile.php, and coupling it with a simple form that takes the username and password of the new user. This file is NOT localized. It is only available in english. Localizing it would involve creating proper entries in a language file - which I didn't need.

Duplication user detection is performed, and the supplied password is md5'ed. So far, no special password special-character translation is performed even though it is done in profile.php. New users are supplied with default values from the board's global configuration values.

After the new user is created, it may be edited from phpBB2's native user management functions.

usage

After downloading admin_user_new.php.txt, rename the file to admin_user_new.php and place it in phpBB2's admin directory. The next time admin mode is used, the Add User option appears in the User Admin section. Provide an unused username, and supply a password. Then click on the add user button.