From: Fran Rogers Date: Tue, 19 Aug 2008 02:00:43 +0000 (+0000) Subject: Run autocreated accounts through AbortNewAccount hooks X-Git-Tag: 1.31.0-rc.0~45806 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=15aa8023ffb28c7f90ab72be92f9b463b0965d86;p=lhc%2Fweb%2Fwiklou.git Run autocreated accounts through AbortNewAccount hooks --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 00c93d6513..551d9c06e2 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -500,6 +500,14 @@ class LoginForm { return self::CREATE_BLOCKED; } + $abortError = ''; + if( !wfRunHooks( 'AbortNewAccount', array( $user->getName(), &$abortError ) ) ) { + // Hook point to add extra creation throttles and blocks + wfDebug( __METHOD__.": a hook blocked creation\n" ); + $this->mainLoginForm( $abortError ); + return self::ABORTED; + } + wfDebug( __METHOD__.": creating account\n" ); $user = $this->initUser( $user, true ); return self::SUCCESS;