Add config option to disable blocking auto account creations

Bug: T35429
Change-Id: I83a80ba1c9f23962a8df5e8478b30c8b6e00eb70
This commit is contained in:
Alex Monk 2015-07-09 04:29:14 +01:00 committed by Legoktm
parent 3fd8c88b0d
commit e483b741af
2 changed files with 20 additions and 2 deletions

View file

@ -163,6 +163,8 @@ class TitleBlacklistHooks {
* AbortNewAccount hook
*
* @param User $user
* @param string &$message
* @return bool
*/
public static function abortNewAccount( $user, &$message ) {
global $wgUser, $wgRequest;
@ -170,6 +172,21 @@ class TitleBlacklistHooks {
return self::acceptNewUserName( $user->getName(), $wgUser, $message, $override, true );
}
/**
* AbortAutoAccount hook
*
* @param User $user
* @param string &$message
* @return bool
*/
public static function abortAutoAccount( $user, &$message ) {
global $wgTitleBlacklistBlockAutoAccountCreation;
if ( $wgTitleBlacklistBlockAutoAccountCreation ) {
return self::abortNewAccount( $user, $message );
}
return true;
}
/**
* EditFilter hook
*

View file

@ -73,7 +73,7 @@
"TitleBlacklistHooks::abortNewAccount"
],
"AbortAutoAccount": [
"TitleBlacklistHooks::abortNewAccount"
"TitleBlacklistHooks::abortAutoAccount"
],
"EditFilter": [
"TitleBlacklistHooks::validateBlacklist"
@ -99,7 +99,8 @@
"warningchance": 100,
"expiry": 900,
"warningexpiry": 600
}
},
"TitleBlacklistBlockAutoAccountCreation": true
},
"manifest_version": 1
}