User:GhostInTheMachine/Lowercase Usernames
From MediaWiki.org
Hack to allow fully Lowercase usernames. (This is not nice enough to be called an extension.)
Contents |
[edit] The problem
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:
- The phpBB forum software allows usernames to be in any case and ignores case during login.
- The wiki extension forces the wiki to use the phpBB account as held in the phpBB database tables.
- When the extension meets a phpBB account for the first time, it creates a matching wiki account.
- The extension uppercases the first letter of the phpBB account name and lowercases the rest.
- The wiki username suffers by having
- the starting letter converted to upper case (by policy)
- the remaining letters converted to lower case (by error? by excess zeal?).
[edit] My solution
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).
[edit] Extension hack
[edit] extensions/Auth_phpBB/Auth_phpBB.php
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'];
[edit] Wiki hack
Starting with MediaWiki version 1.14.0
[edit] includes/Title.php
The important one.
[edit] includes/Export.php
To be complete.
[edit] includes/specials/SpecialCategories.php
To be complete.