Manual:$wgInvalidUsernameCharacters/zh

详情
创建新帐户时阻止的字符.

@ 符号默认被禁止，因为MediaWiki在内部作为用户在另外一个Wiki的帐户（跨Wiki用户）所使用. The : sign is prohibited because the validity of usernames in different wikis differs due to different namespace and interwiki configuration. 如果您允许在用户名中使用"@"符号，您应该也对进行设定. Otherwise you won't be able to give users with an "@" in the username different permissions using the normal way (though permissions can still be set via user ID). However, you are free to allow the ":" in usernames as long as you don't run multiple wikis with shared database or Extension:CentralAuth, and you don't create new namespace or interwiki prefixes which make existing username invalid.

This is used in a regular expression character class during registration (regex metacharacters like / are escaped).

Example
In case user names containing @, # and € should be prevented, the following setting is used: