http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95041
Revision: 95041
Author: raymond
Date: 2011-08-19 20:57:41 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
New hook point to change $wgAccountCreationThrottle
Needed for a new extension to make (mass) account creation easier for
schools/colleges etc
Modified Paths:
--------------
trunk/phase3/docs/hooks.txt
trunk/phase3/includes/specials/SpecialUserlogin.php
Modified: trunk/phase3/docs/hooks.txt
===================================================================
--- trunk/phase3/docs/hooks.txt 2011-08-19 20:55:55 UTC (rev 95040)
+++ trunk/phase3/docs/hooks.txt 2011-08-19 20:57:41 UTC (rev 95041)
@@ -643,6 +643,10 @@
'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).
Modified: trunk/phase3/includes/specials/SpecialUserlogin.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUserlogin.php 2011-08-19 20:55:55 UTC
(rev 95040)
+++ trunk/phase3/includes/specials/SpecialUserlogin.php 2011-08-19 20:57:41 UTC
(rev 95041)
@@ -377,6 +377,9 @@
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 );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs