Manual:Hooks/AuthPluginAutoCreate

From Linux Web Expert

Revision as of 00:19, 3 October 2020 by imported>SamanthaNguyen (move deprecated message into main template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AuthPluginAutoCreate
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called when creating a local account for an user logged in from an external authentication method
<translate> Define function:</translate>
public static function onAuthPluginAutoCreate( $user ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"AuthPluginAutoCreate": "MediaWiki\\Extension\\MyExtension\\Hooks::onAuthPluginAutoCreate"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialUserLogin.php
<translate> Interface:</translate> AuthPluginAutoCreateHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:AuthPluginAutoCreate extensions</tvar>.</translate>


Details

  • $user: User object created locally