MediaWiki
master
TempUserConfig.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\User\TempUser
;
4
5
use
MediaWiki\Permissions\Authority
;
6
use
Wikimedia\Rdbms\IExpression
;
7
use
Wikimedia\Rdbms\IReadableDatabase
;
8
18
interface
TempUserConfig
{
24
public
function
isEnabled
();
25
32
public
function
isKnown
();
33
40
public
function
isAutoCreateAction
(
string
$action );
41
51
public
function
shouldAutoCreate
(
Authority
$authority,
string
$action );
52
60
public
function
isTempName
(
string
$name );
61
70
public
function
isReservedName
(
string
$name );
71
77
public
function
getPlaceholderName
(): string;
78
87
public
function
getMatchPattern
():
Pattern
;
88
97
public
function
getMatchPatterns
(): array;
98
108
public
function
getMatchCondition
(
IReadableDatabase
$db,
string
$field,
string
$op ):
IExpression
;
109
118
public
function
getExpireAfterDays
(): ?int;
119
128
public
function
getNotifyBeforeExpirationDays
(): ?int;
129
}
MediaWiki\User\TempUser\Pattern
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.
Definition
Pattern.php:16
MediaWiki\Permissions\Authority
This interface represents the authority associated with the current execution context,...
Definition
Authority.php:37
MediaWiki\User\TempUser\TempUserConfig
Interface for temporary user creation config and name matching.
Definition
TempUserConfig.php:18
MediaWiki\User\TempUser\TempUserConfig\shouldAutoCreate
shouldAutoCreate(Authority $authority, string $action)
Should/would auto-create be performed if the user attempts to perform the given action?
MediaWiki\User\TempUser\TempUserConfig\getMatchPattern
getMatchPattern()
Get a Pattern indicating how temporary account can be detected.
MediaWiki\User\TempUser\TempUserConfig\getExpireAfterDays
getExpireAfterDays()
After how many days do temporary users expire?
MediaWiki\User\TempUser\TempUserConfig\isTempName
isTempName(string $name)
Does the name match the configured pattern indicating that it is a temporary auto-created user?
MediaWiki\User\TempUser\TempUserConfig\getNotifyBeforeExpirationDays
getNotifyBeforeExpirationDays()
How many days before expiration should temporary users be notified?
MediaWiki\User\TempUser\TempUserConfig\getMatchCondition
getMatchCondition(IReadableDatabase $db, string $field, string $op)
Get a SQL query condition that will match (or not match) temporary accounts.
MediaWiki\User\TempUser\TempUserConfig\isKnown
isKnown()
Are temporary accounts a known concept on the wiki? This should return true if any temporary accounts...
MediaWiki\User\TempUser\TempUserConfig\getPlaceholderName
getPlaceholderName()
Get a placeholder name which matches the reserved prefix.
MediaWiki\User\TempUser\TempUserConfig\isReservedName
isReservedName(string $name)
Does the name match a configured pattern which indicates that it conflicts with temporary user names?...
MediaWiki\User\TempUser\TempUserConfig\getMatchPatterns
getMatchPatterns()
Get Patterns indicating how temporary account can be detected.
MediaWiki\User\TempUser\TempUserConfig\isAutoCreateAction
isAutoCreateAction(string $action)
Is the action valid for user auto-creation?
MediaWiki\User\TempUser\TempUserConfig\isEnabled
isEnabled()
Is temp user creation enabled?
Wikimedia\Rdbms\IExpression
Definition
IExpression.php:10
Wikimedia\Rdbms\IReadableDatabase
A database connection without write operations.
Definition
IReadableDatabase.php:37
MediaWiki\User\TempUser
Definition
CreateStatus.php:3
includes
user
TempUser
TempUserConfig.php
Generated on Thu Oct 3 2024 15:26:53 for MediaWiki by
1.10.0