Jump to content

手册:$wgReservedUsernames

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

详情

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

如果$wgReservedUsernames中的条目以msg:开头,则保留的用户名将被视为该消息在此wiki中默认语言的值。

默认值

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', // 由maintenance/deleteBatch.php使用的默认用户名
	'Move page script', // 被maintenance/moveBatch.php使用的默认用户名
	'Command line script', // 由maintenance/undelete.php使用的默认用户名
	'Unknown user', // 在WikiImporter和RevisionStore中用于没有作者的,或者在User中有无效-{zh-hans:用户;zh-hant:使用者;zh-hk:用戶;}-ID的-{zh-hans:用户;zh-hant:使用者;zh-hk:用戶;}-
	'msg:double-redirect-fixer', // 自动修复双重重定向
	'msg:usermessage-editor', // 用于用户留言的默认用户
	'msg:proxyblocker', // 用于$wgProxyList以及Special:Blockme(已在1.22移除)
	'msg:sorbs', // 用于$wgEnableDnsBlacklist等
	'msg:spambot_username', // 用于cleanupSpam.php
	'msg:autochange-username', // 由匿名类别的最近更改条目(解析器函数、Lua和刷新)使用
];
MediaWiki版本:
1.36 – 1.38
$wgReservedUsernames = [
	'MediaWiki default', // 默认的“首页”以及MediaWiki:系统消息页面
	'Conversion script', // 用于旧版维基百科软件升级
	'Maintenance script', // 执行编辑的维护脚本以及图像导入脚本
	'Template namespace initialisation script', // 用于从1.2升级至1.3
	'ScriptImporter', // 由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', // 自动修复双重重定向
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // 用于$wgProxyList以及Special:Blockme(已在1.22移除)
	'msg:sorbs', // 用于$wgEnableDnsBlacklist等
	'msg:spambot_username', // 用于cleanupSpam.php
	'msg:autochange-username', // 由匿名类别的最近更改条目(解析器函数、Lua和刷新)使用
];
MediaWiki版本:
1.31 – 1.35
$wgReservedUsernames = [
	'MediaWiki default', // 默认的“首页”以及MediaWiki:系统消息页面
	'Conversion script', // 用于旧版维基百科软件升级
	'Maintenance script', // 执行编辑的维护脚本以及图像导入脚本
	'Template namespace initialisation script', // 用于从1.2升级至1.3
	'ScriptImporter', // 由maintenance/importSiteScripts.php使用的默认用户名
	'Unknown user', // Used in WikiImporter and RevisionStore for revisions with no author
	'msg:double-redirect-fixer', // 自动修复双重重定向
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // 用于$wgProxyList以及Special:Blockme(已在1.22移除)
	'msg:sorbs', // 用于$wgEnableDnsBlacklist等
	'msg:spambot_username', // 用于cleanupSpam.php
	'msg:autochange-username', // 由匿名类别的最近更改条目(解析器函数、Lua和刷新)使用
];
MediaWiki版本:
1.29 – 1.30
$wgReservedUsernames = [
	'MediaWiki default', // 默认的“首页”以及MediaWiki:系统消息页面
	'Conversion script', // 用于旧版维基百科软件升级
	'Maintenance script', // 执行编辑的维护脚本以及图像导入脚本
	'Template namespace initialisation script', // 用于从1.2升级至1.3
	'ScriptImporter', // 由maintenance/importSiteScripts.php使用的默认用户名
	'Unknown user', // Used in WikiImporter when importing revisions with no author
	'msg:double-redirect-fixer', // 自动修复双重重定向
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // 用于$wgProxyList以及Special:Blockme(已在1.22移除)
	'msg:spambot_username', // 用于cleanupSpam.php
	'msg:autochange-username', // 由匿名类别的最近更改条目(解析器函数、Lua和刷新)使用
];
MediaWiki版本:
1.19 – 1.25
$wgReservedUsernames = array(
	'MediaWiki default', // 默认的“首页”以及MediaWiki:系统消息页面
	'Conversion script', // 用于旧版维基百科软件升级
	'Maintenance script', // 执行编辑的维护脚本以及图像导入脚本
	'Template namespace initialisation script', // 用于从1.2升级至1.3
	'ScriptImporter', // 由maintenance/importSiteScripts.php使用的默认用户名
	'msg:double-redirect-fixer', // 自动修复双重重定向
	'msg:usermessage-editor', // Default user for leaving user messages
	'msg:proxyblocker', // 用于Special:Blockme
);
MediaWiki版本:
1.9 – 1.12

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

$wgReservedUsernames = array(
	'MediaWiki default', // 默认的“首页”以及MediaWiki:系统消息页面
	'Conversion script', // 用于旧版维基百科软件升级
	'Maintenance script', // ... maintenance/edit.php uses this?
	'Template namespace initialisation script', // 用于从1.2升级至1.3
);
MediaWiki版本:
1.6 – 1.8
$wgReservedUsernames = [ 'MediaWiki default', 'Conversion script' ];

更改默认值

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