From: Raimond Spekking Date: Fri, 19 Aug 2011 20:57:41 +0000 (+0000) Subject: New hook point to change $wgAccountCreationThrottle X-Git-Tag: 1.31.0-rc.0~28160 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=cda98b8976f4ee2b69583b17453bb215353f1617;p=lhc%2Fweb%2Fwiklou.git New hook point to change $wgAccountCreationThrottle Needed for a new extension to make (mass) account creation easier for schools/colleges etc --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 584f841ea6..22376e953a 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -643,6 +643,10 @@ $output: OutputPage object in use 'CategoryPageView': before viewing a categorypage in CategoryPage::view $catpage: CategoryPage instance +'ChangeAccountCreationThrottle': Called to change $wgAccountCreationThrottle +$ip: The ip address of the user +&$wgAccountCreationThrottle: The global variable $wgAccountCreationThrottle to be changed + 'ChangesListInsertArticleLink': Override or augment link to article in RC list. &$changesList: ChangesList instance. &$articlelink: HTML of link to article (already filled-in). diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index ee4d617ff7..14a06e4212 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -377,6 +377,9 @@ class LoginForm extends SpecialPage { return false; } + // Hook point to change $wgAccountCreationThrottle + wfRunHooks( 'ChangeAccountCreationThrottle', array( $ip, &$wgAccountCreationThrottle ) ); + if ( $wgAccountCreationThrottle && $wgUser->isPingLimitable() ) { $key = wfMemcKey( 'acctcreate', 'ip', $ip ); $value = $wgMemc->get( $key );