http://bugzilla.wikimedia.org/show_bug.cgi?id=2943
http://bugzilla.wikimedia.org/attachment.cgi?id=739
* "uselang" and "useskin" URL parameters can now be used in the URL when
viewing a page, to change the language and skin of a page respectively.
* Skins can now be previewed in preferences
+* (bug 2943) AuthPlugin::getCanonicalName() name canonicalization hook,
+ patch from robla
+
=== Caveats ===
function initUser( &$user ) {
# Override this to do something.
}
+
+ /**
+ * If you want to munge the case of an account name before the final
+ * check, now is your chance.
+ */
+ function getCanonicalName( $username ) {
+ return $username;
+ }
}
?>
# Reject various classes of invalid names
$canonicalName = $t->getText();
+ global $wgAuth;
+ $canonicalName = $wgAuth->getCanonicalName( $t->getText() );
+
if( !User::isValidUserName( $canonicalName ) ) {
return null;
}
$u->setName( $canonicalName );
- $u->setId( $u->idFromName( $t->getText() ) );
+ $u->setId( $u->idFromName( $canonicalName ) );
return $u;
}