Manual:Hooks/AutoAuthenticate
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.13.0</tvar>.</translate> <translate> Please see <tvar name=page>MediaWiki\Session\SessionProvider</tvar> for an alternative way to use this feature.</translate> |
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.