Manual:Hooks/AbortAutoAccount

AbortAutoAccount
Available from version 1.18.0 (r85410, codereview)
Removed in version 1.33.0 (Gerrit change 441513)
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": "MediaWiki\\Extension\\MyExtension\\Hooks::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.


Details

edit
  • $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.