MediaWiki
REL1_33
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
}
BaseBlacklist\getEmailBlacklist
static getEmailBlacklist()
Definition
BaseBlacklist.php:103
MediaWiki\Auth\AbstractPreAuthenticationProvider
A base class that implements some of the boilerplate for a PreAuthenticationProvider.
Definition
AbstractPreAuthenticationProvider.php:31
SpamBlacklistPreAuthenticationProvider
Definition
SpamBlacklistPreAuthenticationProvider.php:5
SpamBlacklistPreAuthenticationProvider\testForAccountCreation
testForAccountCreation( $user, $creator, array $reqs)
Determine whether an account creation may begin.
Definition
SpamBlacklistPreAuthenticationProvider.php:6
array
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
extensions
SpamBlacklist
includes
SpamBlacklistPreAuthenticationProvider.php
Generated on Mon Nov 25 2024 15:48:59 for MediaWiki by
1.10.0