Manual:$wgAutoCreateTempUser
User accounts, authentication: $wgAutoCreateTempUser | |
---|---|
Configuration for automatic creation of temporary accounts on page save. |
|
Introduced in version: | 1.39.0 (Gerrit change 767617; git #e8dbf5f8) |
Removed in version: | Still in use |
Allowed values: | (array) |
Default value: | see below |
Other settings: Alphabetical | By function |
Details
editConfiguration for automatic creation of temporary accounts on page save. This can be enabled to avoid exposing the IP addresses of casual editors who do not explicitly create an account.
An associative array with the following keys:
known
: (bool) Whether auto-creation is known about. Set this to 'true' if temp accounts have been created on this wiki already. This setting allows temp users to be recognized even if auto-creation is currently disabled. If auto-creation is enabled via the 'enabled' property, then 'known' is overriden to true.enabled
: (bool) Whether auto-creation is enabled. If changing this value from 'true' to 'false', you should also set 'known' to true, so that relevant code can continue to identify temporary accounts as visually and conceptually distinct from anonymous accounts and named accounts.actions
: (array) A list of actions for which the feature is enabled. Currently onlyedit
is supported.genPattern
: (string) The pattern used when generating new usernames. This should have$1
indicating the place where the serial string will be substituted.matchPattern
: (string) The pattern used when determining whether a username is a temporary user. This affects the rights of the user and also prevents explicit creation of users with matching names. This is ignored ifenabled
is false.reservedPattern
: (string) A pattern used to determine whether a username should be denied for explicit creation, in addition to matchPattern. This is used even ifenabled
is false.serialProvider
: (array) Configuration for generation of unique integer indexes which are used to make temporary usernames.type
(string) May be "local" to allocate indexes using the local database. If the CentralAuth extension is enabled, it may be "centralauth". Extensions may plug in additional types using the$wgTempUserSerialProviders
attribute.numShards
(int, default 1) A small integer. This can be set to a value greater than 1 to avoid acquiring a global lock when allocating IDs, at the expense of making the IDs be non-monotonic.useYear
(bool) Restart at 1 each time the year changes (in UTC). To avoid naming conflicts, the year is included in the name after the prefix, in the form 'YYYY-'.
serialMapping
: (array) Configuration for mapping integer indexes to strings to substitute intogenPattern
.type
: (string) May be"plain-numeric"
to use ASCII decimal numbers"localized-numeric"
to use numbers localized using a specific language"filtered-radix"
to use numbers in an arbitrary base between 2 and 36, with an optional list of "bad" IDs to skip over."scramble"
: to use ASCII decimal numbers that are short but non-consecutive.
language
: (string) With"localized-numeric"
, the language coderadix
: (int) With"filtered-radix"
, the basebadIndexes
: (array) With"filtered-radix"
, an array with the bad unmapped indexes in the values. The integers must be sorted and the list must never change after the indexes have been allocated. The keys must be zero-based array indexes.uppercase
: (bool) With"filtered-radix"
, whether to use uppercase letters, default false.offset
: (int) With"plain-numeric"
, a constant to add to the stored index.
Default value
editMediaWiki version: | ≥ 1.43 |
$wgAutoCreateTempUser = [
'known' => false,
'enabled' => false,
'actions' => [
'edit',
],
'genPattern' => '~$1',
'matchPattern' => null,
'reservedPattern' => '~$1',
'serialProvider' => [
'type' => 'local',
'useYear' => true,
],
'serialMapping' => [
'type' => 'plain-numeric',
],
'expireAfterDays' => 90,
'notifyBeforeExpirationDays' => 10,
];
MediaWiki version: | 1.42 |
$wgAutoCreateTempUser = [
'enabled' => false,
'actions' => [
'edit',
],
'genPattern' => '~$1',
'matchPattern' => null,
'reservedPattern' => '~$1',
'serialProvider' => [
'type' => 'local',
'useYear' => true,
],
'serialMapping' => [
'type' => 'plain-numeric',
],
'expireAfterDays' => 365,
'notifyBeforeExpirationDays' => 10,
];
MediaWiki version: | 1.41 |
$wgAutoCreateTempUser = [
'enabled' => false,
'actions' => [
'edit',
],
'genPattern' => '*Unregistered $1',
'matchPattern' => '*$1',
'reservedPattern' => null,
'serialProvider' => [
'type' => 'local',
],
'serialMapping' => [
'type' => 'plain-numeric',
],
];
MediaWiki versions: | 1.39 – 1.40 |
$wgAutoCreateTempUser = [
'enabled' => false,
'actions' => [
'edit',
],
'genPattern' => '*Unregistered $1',
'matchPattern' => '*$1',
'serialProvider' => [
'type' => 'local',
],
'serialMapping' => [
'type' => 'plain-numeric',
],
];