MediaWiki master
|
The real TempUserConfig including internal methods used by TempUserCreator. More...
Inherits MediaWiki\User\TempUser\TempUserConfig.
Public Member Functions | |
__construct ( $config) | |
getExpireAfterDays () | |
After how many days do temporary users expire? | |
getGeneratorPattern () | |
getMatchCondition (IReadableDatabase $db, string $field, string $op) | |
Get a SQL query condition that will match (or not match) temporary accounts. | |
getMatchPattern () | |
Get a Pattern indicating how temporary account can be detected. | |
getMatchPatterns () | |
Get Patterns indicating how temporary account can be detected. | |
getNotifyBeforeExpirationDays () | |
How many days before expiration should temporary users be notified? | |
getPlaceholderName () | |
Get a placeholder name which matches the reserved prefix. | |
getSerialMappingConfig () | |
getSerialProviderConfig () | |
isAutoCreateAction (string $action) | |
Is the action valid for user auto-creation? | |
isEnabled () | |
Is temp user creation enabled? | |
isReservedName (string $name) | |
Does the name match a configured pattern which indicates that it conflicts with temporary user names? Should manual user creation be denied? | |
isTempName (string $name) | |
Does the name match the configured pattern indicating that it is a temporary auto-created user? | |
shouldAutoCreate (Authority $authority, string $action) | |
Should/would auto-create be performed if the user attempts to perform the given action? | |
The real TempUserConfig including internal methods used by TempUserCreator.
Definition at line 18 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::__construct | ( | $config | ) |
array | $config | See the documentation of $wgAutoCreateTempUser.
|
Definition at line 58 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getExpireAfterDays | ( | ) |
After how many days do temporary users expire?
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 167 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getGeneratorPattern | ( | ) |
Definition at line 179 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getMatchCondition | ( | IReadableDatabase | $db, |
string | $field, | ||
string | $op | ||
) |
Get a SQL query condition that will match (or not match) temporary accounts.
IReadableDatabase | $db | |
string | $field | Database field to match against |
string | $op | Operator: IExpression::LIKE or IExpression::NOT_LIKE |
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 146 of file RealTempUserConfig.php.
References Wikimedia\Rdbms\IReadableDatabase\expr().
MediaWiki\User\TempUser\RealTempUserConfig::getMatchPattern | ( | ) |
Get a Pattern indicating how temporary account can be detected.
Used to avoid selecting a temp account via select queries.
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 127 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getMatchPatterns | ( | ) |
Get Patterns indicating how temporary account can be detected.
Used to avoid selecting a temp account via select queries.
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 138 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getNotifyBeforeExpirationDays | ( | ) |
How many days before expiration should temporary users be notified?
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 171 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getPlaceholderName | ( | ) |
Get a placeholder name which matches the reserved prefix.
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 119 of file RealTempUserConfig.php.
MediaWiki\User\TempUser\RealTempUserConfig::getSerialMappingConfig | ( | ) |
Definition at line 199 of file RealTempUserConfig.php.
Referenced by MediaWiki\User\TempUser\TempUserCreator\__construct().
MediaWiki\User\TempUser\RealTempUserConfig::getSerialProviderConfig | ( | ) |
Definition at line 191 of file RealTempUserConfig.php.
Referenced by MediaWiki\User\TempUser\TempUserCreator\__construct().
MediaWiki\User\TempUser\RealTempUserConfig::isAutoCreateAction | ( | string | $action | ) |
Is the action valid for user auto-creation?
string | $action |
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 89 of file RealTempUserConfig.php.
References MediaWiki\User\TempUser\RealTempUserConfig\isEnabled().
Referenced by MediaWiki\User\TempUser\RealTempUserConfig\shouldAutoCreate().
MediaWiki\User\TempUser\RealTempUserConfig::isEnabled | ( | ) |
Is temp user creation enabled?
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 85 of file RealTempUserConfig.php.
Referenced by MediaWiki\User\TempUser\RealTempUserConfig\isAutoCreateAction(), and MediaWiki\User\TempUser\RealTempUserConfig\isTempName().
MediaWiki\User\TempUser\RealTempUserConfig::isReservedName | ( | string | $name | ) |
Does the name match a configured pattern which indicates that it conflicts with temporary user names? Should manual user creation be denied?
string | $name |
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 115 of file RealTempUserConfig.php.
References MediaWiki\User\TempUser\RealTempUserConfig\isTempName().
MediaWiki\User\TempUser\RealTempUserConfig::isTempName | ( | string | $name | ) |
Does the name match the configured pattern indicating that it is a temporary auto-created user?
string | $name |
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 103 of file RealTempUserConfig.php.
References MediaWiki\User\TempUser\RealTempUserConfig\isEnabled().
Referenced by MediaWiki\User\TempUser\RealTempUserConfig\isReservedName().
MediaWiki\User\TempUser\RealTempUserConfig::shouldAutoCreate | ( | Authority | $authority, |
string | $action | ||
) |
Should/would auto-create be performed if the user attempts to perform the given action?
Authority | $authority | |
string | $action |
Implements MediaWiki\User\TempUser\TempUserConfig.
Definition at line 97 of file RealTempUserConfig.php.
References MediaWiki\Permissions\Authority\isAllowed(), MediaWiki\User\TempUser\RealTempUserConfig\isAutoCreateAction(), and MediaWiki\Permissions\Authority\isRegistered().