Manual:$wgReservedUsernames

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎polski • ‎русский • ‎中文 • ‎日本語
Users: $wgReservedUsernames
List of account names that cannot exist.
Introduced in version:1.6.4 (r13646)
Removed in version:still in use
Allowed values:array of strings
Default value:see below
Other settings: Alphabetical | By function

Details[edit]

Array of usernames which may not be registered or logged in from. Maintenance scripts can still use these. Extensions can use the UserGetReservedNames hook to add to this array.

If an entry in $wgReservedUsernames starts with msg: then the reserved username is taken to be the value of that message (in the wiki's content language).

Default value[edit]

May 2017(2017-05)[edit]

$wgReservedUsernames = [
	'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
	'Conversion script', // Used for the old Wikipedia software upgrade
	'Maintenance script', // Maintenance scripts which perform editing, image import script
	'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
	'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
	'Unknown user', // Used in WikiImporter when importing revisions with no author
	'msg:double-redirect-fixer', // Automatic double redirect fix
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
	'msg:spambot_username', // Used by cleanupSpam.php
	'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
];

September 2012(2012-09)[edit]

$wgReservedUsernames = array(
	'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
	'Conversion script', // Used for the old Wikipedia software upgrade
	'Maintenance script', // Maintenance scripts which perform editing, image import script
	'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
	'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
	'msg:double-redirect-fixer', // Automatic double redirect fix
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // For Special:Blockme
);

Prior to 1.13[edit]

The double redirect fixer has been added in 1.13.

Prior to 1.9.0[edit]

Prior to 1.9.0, the following default value was present:

$wgReservedUsernames = array( 'MediaWiki default', 'Conversion script' );

Changing the default values[edit]

// Add just one user name to the default array
$wgReservedUsernames[] = 'John Doe';
// Add several user names to the default array
$wgReservedUsernames = array_merge(
    $wgReservedUsernames,
    [ 'John Doe', 'Jane Doe', 'N.N.' ]
);

Overriding the default with a bundle of different user names and discarding the user names set by default is not recommended.