Manual:Hooks/LoadUserOptions

From Linux Web Expert

LoadUserOptions
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
This hook is called when user options/preferences are being loaded from the database
<translate> Define function:</translate>
public static function onLoadUserOptions( UserIdentity $user, array &$options ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"LoadUserOptions": "MediaWiki\\Extension\\MyExtension\\Hooks::onLoadUserOptions"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> user/UserOptionsManager.php
<translate> Interface:</translate> LoadUserOptionsHook.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:LoadUserOptions extensions</tvar>.</translate>


Details

See also