Manual:Hooks/AbortNewAccount
This feature was removed from MediaWiki core in version 1.33.0 (after being deprecated in 1.27.0). Please see MediaWiki\Auth\PreAuthenticationProvider for an alternative way to use this feature. |
AbortNewAccount | |
---|---|
Available from version 1.5.8 Removed in version 1.33.0 (Gerrit change 441513) Can be used to cancel user account creation | |
Define function: | public static function onAbortNewAccount( User $user, &$message ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"AbortNewAccount": "MediaWiki\\Extension\\MyExtension\\Hooks::onAbortNewAccount"
}
}
|
Called from: | File(s): specials/SpecialUserLogin.php |
Interface: | AbortNewAccountHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:AbortNewAccount extensions.
Details
edit$user
: the User object about to be created (read-only, incomplete)$message
: out parameter: error message to display on abort
Notes
edit- Return false to cancel account creation.