Manual:Hooks/AutoAuthenticate

From Linux Web Expert

Revision as of 00:18, 28 February 2021 by imported>Baris6161TURK
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AutoAuthenticate
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar </tvar></translate>
Called to authenticate users on external/environmental means
<translate> Define function:</translate>
public static function onAutoAuthenticate( &$user ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"AutoAuthenticate": "MediaWiki\\Extension\\MyExtension\\Hooks::onAutoAuthenticate"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> StubObject.php
<translate> Interface:</translate> AutoAuthenticateHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>


The return result for this hook is not used by MediaWiki.

Details

  • $user: A user object to be setup by the external authentication extension. Once an extension creates and logs in a user, they should assign that user to this object.