Manual:$wgReservedUsernames/zh

From Linux Web Expert

<translate> User accounts, authentication</translate>: $wgReservedUsernames
列出的不应存在的用户名。
<translate> Introduced in version:</translate>1.6.4 (r13646)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(-{zh-hans:字符串数组; zh-hant:字串陣列;}-)
<translate> Default value:</translate>参见下方

细节

一组不能够在表单被注册或登录的用户名。 维护脚本仍然可以使用它们。 扩展程序可以使用钩子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).

默认值

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.39
<translate> MediaWiki version:</translate>
$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)
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.38</tvar> is unsupported version</translate>">
1.36 – 1.38
<translate> MediaWiki versions:</translate>
$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)
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.35</tvar> is unsupported version</translate>">
1.31 – 1.35
<translate> MediaWiki versions:</translate>
$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)
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.30</tvar> is unsupported version</translate>">
1.29 – 1.30
<translate> MediaWiki versions:</translate>
$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)
];
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.25</tvar> is unsupported version</translate>">
1.19 – 1.25
<translate> MediaWiki versions:</translate>
$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
);
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.12</tvar> is unsupported version</translate>">
1.9 – 1.12
<translate> MediaWiki versions:</translate>

“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
);
<td class="mw-version-versionbox" title="<translate nowrap> MediaWiki <tvar name=1>1.8</tvar> is unsupported version</translate>">
1.6 – 1.8
<translate> MediaWiki versions:</translate>
$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.