$wgTiffThumbnailType
* Renamed two input IDs on Special:Log from 'page' and 'user' to 'mw-log-page' and
'mw-log-user', respectively
-
+* Added $wgInvalidUsernameCharacters to disallow certain characters in
+ usernames during registration (such as "@")
+* Added $wgUserrightsInterwikiDelimiter to allow changing the delimiter
+ used in Special:UserRights to denote the user should be searched for
+ on a different database
+
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
* (bug 17000) Special:RevisionDelete now checks if the database is locked
* To enable, set to a string like 'Main Page'
*/
$wgRedirectOnLogin = null;
+
+/**
+ * Characters to prevent during new account creations.
+ * This is used in a regular expression character class during
+ * registration (regex metacharacters like / are escaped).
+ */
+$wgInvalidUsernameCharacters = '@';
+
+/**
+ * Character used as a delimiter when testing for interwiki userrights
+ * (In Special:UserRights, it is possible to modify users on different
+ * databases if the delimiter is used, e.g. Someuser@enwiki).
+ *
+ * It is recommended that you have this delimiter in
+ * $wgInvalidUsernameCharacters above, or you will not be able to
+ * modify the user rights of those users via Special:UserRights
+ */
+$wgUserrightsInterwikiDelimiter = '@';
\ No newline at end of file
* @return \bool True or false
*/
static function isCreatableName( $name ) {
+ global $wgInvalidUsernameCharacters;
return
self::isUsableName( $name ) &&
// Registration-time character blacklisting...
- strpos( $name, '@' ) === false;
+ !preg_match( '/[' . preg_quote( $wgInvalidUsernameCharacters, ']/' ) . ']/', $name );
}
/**
* @return mixed User, UserRightsProxy, or null
*/
function fetchUser( $username ) {
- global $wgOut, $wgUser;
+ global $wgOut, $wgUser, $wgUserrightsInterwikiDelimiter;
- $parts = explode( '@', $username );
+ $parts = explode( $wgUserrightsInterwikiDelimiter, $username );
if( count( $parts ) < 2 ) {
$name = trim( $username );
$database = '';