From 70a038b808acbcb462c74b748514218306b790dd Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 1 Nov 2009 13:58:37 +0000 Subject: [PATCH] Fix another regression from r57558, bug 21369 - Lowercase logins causes MediaWiki to crash --- includes/User.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/User.php b/includes/User.php index d64e3e8b53..4f05bcbecc 100644 --- a/includes/User.php +++ b/includes/User.php @@ -693,8 +693,9 @@ class User { * - 'creatable' Valid for batch processes, login and account creation */ static function getCanonicalName( $name, $validate = 'valid' ) { - # Maybe force usernames to capital - $name = Title::capitalize( $name, NS_USER ); + # Force usernames to capital + global $wgContLang; + $name = $wgContLang->ucfirst( $name ); # Reject names containing '#'; these will be cleaned up # with title normalisation, but then it's too late to -- 2.20.1