Manual:$wgInvalidUsernameCharacters

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Users: $wgInvalidUsernameCharacters
Characters to prevent during new account creations.
Introduced in version: 1.15.0 (r48765)
Removed in version: still in use
Allowed values: String
Default value: '@'

Other settings: Alphabetical | By Function

Details[edit | edit source]

Characters to prevent during new account creations.

The @ sign is prohibited by default, because MediaWiki uses it internally for users that have their account in another wiki (interwiki users). If you allow the "@" in usernames, you should also set $wgUserrightsInterwikiDelimiter. Otherwise you won't be able to give users with an "@" in the username different permissions.

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

Example[edit | edit source]

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

$wgInvalidUsernameCharacters = '@#€';

See also[edit | edit source]