User:GhostInTheMachine/Lowercase Usernames

Hack to allow fully Lowercase usernames. (This is not nice enough to be called an extension.)

The problem edit

The Extension makes the MediaWiki login use the accounts created by a co-resident phpBB forum.

The wiki extension disables the native wiki login and replaces it with one which uses the phpBB account tables.

This can result in a confusion:

  1. The phpBB forum software allows usernames to be in any case and ignores case during login.
  2. The wiki extension forces the wiki to use the phpBB account as held in the phpBB database tables.
  3. When the extension meets a phpBB account for the first time, it creates a matching wiki account.
  4. The extension uppercases the first letter of the phpBB account name and lowercases the rest.
  5. The wiki username suffers by having
    1. the starting letter converted to upper case (by policy)
    2. the remaining letters converted to lower case (by error? by excess zeal?).

My solution edit

One solution would be to force all phpBB usernames to start with an upper case letter.

Since I already have users who have chosen an username which is fully lower case, the solution that I chose was to

  • hack the extension to preserve the case of the phpBB username (reduce the zeal of the extension)
  • hack the wiki so that it allows a username to start with a lower case letter (change wiki policy).

Extension hack edit

extensions/Auth_phpBB/Auth_phpBB.php edit

Preserve case of usernames taken from phpBB.

In

public function getCanonicalName( $username )

change line 509 from

return ucfirst($faryMySQLResult['username_clean']);

to

return $faryMySQLResult['username_clean'];

Wiki hack edit

Starting with MediaWiki version 1.14.0

includes/Title.php edit

The important one.

includes/Export.php edit

To be complete.

includes/specials/SpecialCategories.php edit

To be complete.