MediaWiki
1.34.0
SpamBlacklistPreAuthenticationProvider.php
Go to the documentation of this file.
1
<?php
2
3
use
MediaWiki\Auth\AbstractPreAuthenticationProvider
;
4
5
class
SpamBlacklistPreAuthenticationProvider
extends
AbstractPreAuthenticationProvider
{
6
public
function
testForAccountCreation
( $user, $creator, array $reqs ) {
7
$blacklist =
BaseBlacklist::getEmailBlacklist
();
8
if
( $blacklist->checkUser( $user ) ) {
9
return
StatusValue::newGood
();
10
}
11
12
return
StatusValue::newFatal
(
'spam-blacklisted-email-signup'
);
13
}
14
}
StatusValue\newFatal
static newFatal( $message,... $parameters)
Factory function for fatal errors.
Definition:
StatusValue.php:69
SpamBlacklistPreAuthenticationProvider\testForAccountCreation
testForAccountCreation( $user, $creator, array $reqs)
Determine whether an account creation may begin.
Definition:
SpamBlacklistPreAuthenticationProvider.php:6
StatusValue\newGood
static newGood( $value=null)
Factory function for good results.
Definition:
StatusValue.php:81
BaseBlacklist\getEmailBlacklist
static getEmailBlacklist()
Definition:
BaseBlacklist.php:106
MediaWiki\Auth\AbstractPreAuthenticationProvider
A base class that implements some of the boilerplate for a PreAuthenticationProvider.
Definition:
AbstractPreAuthenticationProvider.php:29
SpamBlacklistPreAuthenticationProvider
Definition:
SpamBlacklistPreAuthenticationProvider.php:5
extensions
SpamBlacklist
includes
SpamBlacklistPreAuthenticationProvider.php
Generated on Thu Dec 19 2019 14:53:59 for MediaWiki by
1.8.16