Extension:PHPBB Auth

This extension links MediaWiki to phpBB's user table for authentication, and disallows the creation of new accounts in MediaWiki. Users must then log in to the wiki with their phpBB account.

Warning about upcoming release
When 3.0.x is released it will support MediaWiki 1.11.x and phpBB v3 which means PHP5 will be required for the plug-in. I have no plans to support or develop older versions of the plug-in. --Nick 17:01, 3 October 2007 (UTC)
 * A beta version of 3.0.1 is now available on the php|leet.php website. This is for phpBB3 (RC5). --Nick 19:04, 5 October 2007 (UTC)

Extension
The extension requires PHP 4 or 5, MySQL 4 or 5, and MediaWiki 1.10.x If you need help, log in at uber.leetphp.com and select 'Support' on the main menu.


 * 1) Download the extension (download, view source code).
 * 2) Add the code below to the bottom of LocalSettings.php.
 * 3) Make a new phpBB group called "wiki". If you set   to true, only users in the wiki group can edit MediaWiki.

Usernames rules
MediaWiki does not follow the same user naming conventions as phpBB, so there may be problem if someone uses an invalid username. Although all MediaWiki usernames are valid in phpBB, some phpBB usernames are not valid in MediaWiki. For example, MediaWiki does not allow the '[]' bracket symbols.

The problem can be circumvented by installing a phpBB extension to restrict MediaWiki-incompatible characters in phpBB. The Restrict Username mod (beta) can do this.

Problems with not sharing a database
Some users experience an error when phpBB and MediaWiki are in different databases, while other users have no problem doing so. It's possible that this may be related to non-English software, which is common to users reporting the error. For more information, see the uber|leet.php forums.

Change log

 * Release 2.6
 * Fixed a login bug where MW was displaying an error the first time a user logged into it.
 * Now works with MW 9.2


 * Release 2.5
 * I made a change to the MySQL connection that might fix some of the issues people have been having.


 * Release 2.4
 * Better MySQL error reporting. More solid MySQL Query calls.


 * Release 2.3
 * phpBB usernames with an apostrophe in them will now work.


 * Release 2.2
 * Fixed a bug that was printing a SQL statment when called.


 * Release 2.1
 * Fixed a bug that was not letting preferences be saved.


 * Release 2.0
 * Works with MediaWiki 1.5.x
 * Fixed the dup name issues. The 1.5 release of MediaWiki added a new function to check for the correct casing of a name before adding it to the wiki database.
 * I test user names with a space in them and they seem to work fine too.
 * Added support for phpBB and the wiki being on two different servers/databases.
 * With the new release of MediaWiki 1.5, I was able to disable some template stuff.


 * Release 1.9
 * Now auto detects MySQL version and uses the correct query.
 * Ver 1.9 will work on both MySQL 4.0.x and 4.1.x


 * Release 1.7
 * Added the code to allow the admin to disable the phpBB wiki group requirement.


 * Release 1.5
 * MediaWiki forces all usernames into a first letter uppercase the rest lower case. (gotroot becomes Gotroot) This is ok until you have a user who has an uppercase letter in the middle of their name. (RetroFit becomes Retrofit) This can cause a problem when trying to Auth with the phpBB user table. I do not have a fix for this. (FIXED)

Community Contributions
Here are some contributions the community has made for this plug-in. They are custom changes that are not part of the plug-ins default code. If you have problems with the custom code below please contact the authors of those sections.

Single-session login
This extra functionality lets MediaWiki share a session with phpBB, which means that a user needs to log in only once. This method only works for PHPBB 2.*. Users will use mediawiki to login, disable the phpbb login page. The author is mconnors (morguefile.com)

Logout
Place this code in includes/SpecialUserLogout.php.

Separate Domains
Synchronous-Login/Logout does not work if your Wiki and phpBB don't share the same domain name (even sub-domains).

For example, if your wiki resides on wiki.domain.com and your phpBB resides on forums.domain.com, the Login and Logout sections won't work as expected.

Note: Should work for sub-domains, if Cookie domain attributes are changed to be available for "*.your-domain.com". See Netscape Cookie Specification Netscape

UTF-8
If you have modified your phpbb2 (e.g. changing from latin1 to utf-8 to upgrade phpbb2 to phpbb3) and the Unable to view external table error occurs, open Auth_phpbb.php and replace

with

Login and logout (RC 1)
A heads up, this does not currently work with RC3 (at least not for me)

If you want to login to phpBB 3 on your form and logout from eg. the Mediawiki, you should follow the description. Author: szotsaki. Please, if you spotted an error, or you if you improved this, email me: [mailto:szotsaki@gmail.com szotsaki@gmail.com]. Thanks :)

Installation (RC4)
Once you have followed the installation instructions, open Auth_phpbb.php and remove the four lines that contain the following: COLLATE latin1_swedish_ci

Username Verification (RC?)
I couldn't get this to work without changing the username check in the phpbb user table to username_clean. Open Auth_phpbb.php and replace all: WHERE `username` with: WHERE `username_clean`