Manual:Hooks/ExemptFromAccountCreationThrottle

From MediaWiki.org
Jump to navigation Jump to search
ExemptFromAccountCreationThrottle
Available from version 1.19.0 (r95152)
To add an exemption from the account creation throttle
Define function:
public static function onExemptFromAccountCreationThrottle( $ip ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ExemptFromAccountCreationThrottle": "MyExtensionHooks::onExemptFromAccountCreationThrottle"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ExemptFromAccountCreationThrottle'][] = 'MyExtensionHooks::onExemptFromAccountCreationThrottle';
Called from:File(s): SpecialUserlogin.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ExemptFromAccountCreationThrottle extensions.

Details[edit]

Return false from the hook if the IP address should be exempted from the account creation throttle.

  • $ip: The ip address of the user