Manual:Hooks/AuthPluginSetup
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate>
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version <tvar name=ver>1.27.0</tvar>.</translate> <translate> Please see <tvar name=page>MediaWiki\Auth\PrimaryAuthenticationProvider</tvar> for an alternative way to use this feature.</translate> |
AuthPluginSetup | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Update or replace authentication plugin object ($wgAuth). | |
<translate> Define function:</translate> | public static function onAuthPluginSetup( $auth ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"AuthPluginSetup": "MediaWiki\\Extension\\MyExtension\\Hooks::onAuthPluginSetup"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Setup.php |
<translate> Interface:</translate> | AuthPluginSetupHook.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:AuthPluginSetup extensions</tvar>.</translate>
Details
This hook gives a chance for an extension to set it programmatically to a variable class.
$auth
: the $wgAuth object