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 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}
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.
Definition Pattern.php:16
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.
isKnown()
Are temporary accounts a known concept on the wiki? This should return true if any 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.