mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-12-19 02:00:55 +00:00
7da5c87df0
Change-Id: I3a8c0c6576f5a0bb1f68f906a8ec37ec079924f4
19 lines
512 B
PHP
19 lines
512 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\SpamBlacklist;
|
|
|
|
use MediaWiki\Auth\AbstractPreAuthenticationProvider;
|
|
use StatusValue;
|
|
|
|
class SpamBlacklistPreAuthenticationProvider extends AbstractPreAuthenticationProvider {
|
|
/** @inheritDoc */
|
|
public function testForAccountCreation( $user, $creator, array $reqs ) {
|
|
$blacklist = BaseBlacklist::getEmailBlacklist();
|
|
if ( $blacklist->checkUser( $user ) ) {
|
|
return StatusValue::newGood();
|
|
}
|
|
|
|
return StatusValue::newFatal( 'spam-blacklisted-email-signup' );
|
|
}
|
|
}
|