MediaWiki 1.41.2
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
76 public function getMatchPattern(): Pattern;
77}
Helper for TempUserConfig representing string patterns with "$1" indicating variable substitution.
Definition Pattern.php:13
This interface represents the authority associated the current execution context, such as a web reque...
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.
isTempName(string $name)
Does the name match the configured pattern indicating that it is a temporary auto-created user?
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?...
isAutoCreateAction(string $action)
Is the action valid for user auto-creation?
isEnabled()
Is temp user creation enabled?