MediaWiki master
TempUserConfig.php
Go to the documentation of this file.
1<?php
2
4
8
18interface TempUserConfig {
24 public function isEnabled();
25
32 public function isAutoCreateAction( string $action );
33
43 public function shouldAutoCreate( Authority $authority, string $action );
44
52 public function isTempName( string $name );
53
62 public function isReservedName( string $name );
63
69 public function getPlaceholderName(): string;
70
79 public function getMatchPattern(): Pattern;
80
89 public function getMatchPatterns(): array;
90
100 public function getMatchCondition( IReadableDatabase $db, string $field, string $op ): IExpression;
101
110 public function getExpireAfterDays(): ?int;
111
120 public function getNotifyBeforeExpirationDays(): ?int;
121}
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?
getMatchCondition(IReadableDatabase $db, string $field, string $op)
Get a SQL query condition that will match (or not match) temporary accounts.
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?
A database connection without write operations.