手册:$wgReservedUsernames

This page is a translated version of the page Manual:$wgReservedUsernames and the translation is 21% complete.
Outdated translations are marked like this.
用户账户、身份验证: $wgReservedUsernames
列出的不应存在的用户名。
引进版本:1.6.4 (r13646)
移除版本:仍在使用
允许的值:(字符串数组)
默认值:参见下方

细节

一组不能够在表单被注册或登录的用户名。 维护脚本仍然可以使用它们。 扩展程序可以使用钩子UserGetReservedNames 添加这一数组。

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).

默认值

MediaWiki版本:
1.39
$wgReservedUsernames = [
	'MediaWiki default', // 默认的“首页”和 MediaWiki: 消息页面
	'Conversion script', // 用于旧的维基百科软件升级
	'Maintenance script', // 执行编辑的维护脚本和图像导入脚本
	'Template namespace initialisation script', // 用于1.2 -> 1.3 的升级
	'ScriptImporter', // 用于 maintenance/importSiteScripts.php 的默认用户名
	'Delete page script', // Default user name used by maintenance/deleteBatch.php
	'Move page script', // Default user name used by maintenance/deleteBatch.php
	'Command line script', // Default user name used by maintenance/undelete.php
	'Unknown user', // Used in WikiImporter & RevisionStore for revisions with no author and in User for invalid user id
	'msg:double-redirect-fixer', // 自动修复双重重定向
	'msg:usermessage-editor', // 用于用户留言的默认用户
	'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
	'msg:sorbs', // For $wgEnableDnsBlacklist etc.
	'msg:spambot_username', // Used by cleanupSpam.php
	'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
];
MediaWiki版本:
1.36 – 1.38
$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 & RevisionStore for revisions with no author and in User for invalid user id
	'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:sorbs', // For $wgEnableDnsBlacklist etc.
	'msg:spambot_username', // Used by cleanupSpam.php
	'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
];
MediaWiki版本:
1.31 – 1.35
$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 and RevisionStore for 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:sorbs', // For $wgEnableDnsBlacklist etc.
	'msg:spambot_username', // Used by cleanupSpam.php
	'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
];
MediaWiki版本:
1.29 – 1.30
$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)
];
MediaWiki版本:
1.19 – 1.25
$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
);
MediaWiki版本:
1.9 – 1.12

“double redirect fixer”在1.13版本被添加。

$wgReservedUsernames = array(
	'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
	'Conversion script', // Used for the old Wikipedia software upgrade
	'Maintenance script', // ... maintenance/edit.php uses this?
	'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
);
MediaWiki版本:
1.6 – 1.8
$wgReservedUsernames = [ 'MediaWiki default', 'Conversion script' ];

Changing the default values

// 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.