MediaWiki master
TempUserConfig.php
Go to the documentation of this file.
1<?php
2
4
6
16interface TempUserConfig {
22 public function isEnabled();
23
30 public function isAutoCreateAction( string $action );
31
41 public function shouldAutoCreate( Authority $authority, string $action );
42
50 public function isTempName( string $name );
51
60 public function isReservedName( string $name );
61
67 public function getPlaceholderName(): string;
68
77 public function getMatchPattern(): Pattern;
78
87 public function getMatchPatterns(): array;
88
97 public function getExpireAfterDays(): ?int;
98
107 public function getNotifyBeforeExpirationDays(): ?int;
108}
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.
Definition Pattern.php:15
This interface represents the authority associated with the current execution context,...
Definition Authority.php:37
Interface for temporary user creation config and name matching.
shouldAutoCreate(Authority $authority, string $action)
Should/would auto-create be performed if the user attempts to perform the given action?
getMatchPattern()
Get a Pattern indicating how temporary account can be detected.
getExpireAfterDays()
After how many days do temporary users expire?
isTempName(string $name)
Does the name match the configured pattern indicating that it is a temporary auto-created user?
getNotifyBeforeExpirationDays()
How many days before expiration should temporary users be notified?
getPlaceholderName()
Get a placeholder name which matches the reserved prefix.
isReservedName(string $name)
Does the name match a configured pattern which indicates that it conflicts with temporary user names?...
getMatchPatterns()
Get Patterns indicating how temporary account can be detected.
isAutoCreateAction(string $action)
Is the action valid for user auto-creation?
isEnabled()
Is temp user creation enabled?