Greetings,
Several people over the last 12+ years have asked -- and not been given an answer -- why usernames' first character are forced to upper-case. I now have the same question. The discussion stems from this talk pages: https://www.mediawiki.org/wiki/Manual_talk:$wgCapitalLinks and https://www.mediawiki.org/wiki/Manual_talk:$wgCapitalLinkOverrides
To me, this looks like an obsolete, legacy requirement from long before the time $wgCapitalLinks was introduced. The relevant code is found in includes/user/User.php:
public static function getCanonicalName( $name, $validate = 'valid' ) { // Force usernames to capital global $wgContLang; $name = $wgContLang->ucfirst( $name );
isValidUserName also checks this condition. But no where do I see *why*.
Proposal:
It seems to me that either $wgCapitalLinks should apply here, or (for backward compatibility), a new option ( $wgCapitalNames ) should be created to allow the site-admin to disable the forcing of ucfirst of usernames.
There is no good reason. But now it's scary to change it, since there could be places where we assume that usernames can not begin with a lowercase letter. There is task https://phabricator.wikimedia.org/T28396 about this. Although folks are complaining about it, it seems that no one has proposed a patch. (As long as the default is still to user capitalized usernames, I don't see why we couldn't have an option to allow lowercase ones.)
For example, one case where we assume usernames can't be lowercase is in some "shortcut" URLs for special pages. URLs like https://en.wikipedia.org/wiki/Special:Contributions/Matma_Rex and https://en.wikipedia.org/wiki/Special:Log/Matma_Rex will display the edits/logs of an account, but URLs like https://en.wikipedia.org/wiki/Special:Contributions/newbies and https://en.wikipedia.org/wiki/Special:Log/block have special meaning (and the edits/logs of a user named "newbies" or "block" couldn't be accessed like this). In this case it's harmless (you could still access them using the form), but there might be assumptions like this in more important places.
mediawiki-l@lists.wikimedia.org