Open main menu

Manual:Hooks/AutoAuthenticate

AutoAuthenticate
Available from version 1.5.4
Removed in version 1.13.0
Called to authenticate users on external/environmental means
Define function:
public static function onAutoAuthenticate( &$user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"AutoAuthenticate": "MyExtensionHooks::onAutoAuthenticate"
	}
}

For MediaWiki ≤1.25:

$wgHooks['AutoAuthenticate'][] = 'MyExtensionHooks::onAutoAuthenticate';
Called from:File(s): StubObject.php

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

Warning Warning: This hook doesn't exist anymore in 1.13 or above, use UserLoadFromSession instead.

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

DetailsEdit

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