* (bug 6009) Use {{ns:project}} in messages where appropriate
* (bug 6012) Update to Indonesian localisation (id)
* (bug 6017) Update list of bookstores in German localisation files
+* (bug 5187) Allow programmatically bypassing username validation, for scripts
+
== Compatibility ==
/**
* Static factory method
* @param string $name Username, validated by Title:newFromText()
+ * @param bool $validate Validate username
* @return User
* @static
*/
- function newFromName( $name ) {
+ function newFromName( $name, $validate = true ) {
# Force usernames to capital
global $wgContLang;
$name = $wgContLang->ucfirst( $name );
global $wgAuth;
$canonicalName = $wgAuth->getCanonicalName( $t->getText() );
- if( !User::isValidUserName( $canonicalName ) ) {
+ if( $validate && !User::isValidUserName( $canonicalName ) ) {
return null;
}