手册:更改用户名
Appearance
Renameuser提供了一个特殊页面,允许授权用户重命名其账户。 重命名完成后,用户的贡献和页面历史记录也将反映新的用户名。 如果您想将一个账户重命名为另一个已经存在的账户,请尝试使用 用户合并 扩展。
在MediaWiki 1.40 之前,这是Extension:Renameuser 的一部分。 (T27482)
用法
请参阅 Help:Renameuser 了解如何使用此功能。
配置
默认情况下,只有行政员可以重命名账户。您可以通过 $wgGroupPermissions
授予其他用户组此权限,例如:
$wgGroupPermissions['sysop']['renameuser'] = true;
注释
- 即使执行者没有
move-subpages
权限,此功能也可以移动用户子页面。 类似地,移动的子页面数量不受$wgMaximumMovedPages
设置的限制。 The feature also movescss
,js
and any other protected subpages.
- If 中央认证 is installed, the rename interface is disabled for local users that are attached to a global account, or to a username reserved by a global account.
You should use CentralAuth's built-in Special:GlobalRenameUser and Special:GlobalRenameRequest/Special:GlobalRenameQueue instead.
- Accounts cannot be renamed to invalid usernames or reserved usernames .
However, accounts can be renamed to names that are blacklisted by AbuseFilter or restricted by other means.
Hooks
- RenameUserComplete – notify extensions of user renames.
- RenameUserAbort – Allows the renaming to be aborted
- RenameUserPreRename – Called before a user is renamed
- RenameUserSQL – Called before a user is renamed
- RenameUserWarning – Called before a user is renamed
Known issues
- Due to a bug, you can't rename your own account (i.e. the account performing the rename) (工單T267477).
Use the command line maintenance script to do the rename, or use a different account to do the rename.
- If an account has a large number of userpages that the rename times out while moving them from User:A/subpage... to User:B/subpage..., What do I do now?
- You can't fix the situation by immediately trying again to rename User A to User B, because it will simply say "The user 'User A' does not exist." To fix the situation, rename User B back to User A, after unchecking the box "Move user and talk pages (and their subpages) to new name". Then rename User A to User B again, this time leaving the box "Move user and talk pages (and their subpages) to new name" checked. The page moving will resume where it left off.
- Renameuser is currently incompatible with $wgSharedDB . See phab:T104830.