Manual:Hooks/AbortAutoAccount

AbortAutoAccount
Available from version 1.18.0 (r85410, codereview)
Removed in version 1.33.0
Allow to cancel automated local account creation, where normally authentication against an external auth plugin would be creating a local account.
Define function:
public static function onAbortAutoAccount( User $user, &$abortMsg ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"AbortAutoAccount": "MyExtensionHooks::onAbortAutoAccount"
	}
}
Called from: File(s): specials/SpecialUserLogin.php
Interface: AbortAutoAccountHook.php

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


DetailsEdit

  • $user: the User object about to be created (read-only, incomplete)
  • &$abortMsg: out parameter: name of error message to be displayed to user

Return false to cancel automated local account creation.