Manual:Hooks/LocalUserOptionsStoreSave
LocalUserOptionsStoreSave | |
---|---|
Available from version 1.45.0 (Gerrit change 1149757) called just after saving preferences in MediaWiki\User\Options\LocalUserOptionsStore | |
Define function: | public static function onLocalUserOptionsStoreSave( MediaWiki\User\UserIdentity $user, array $oldOptions, array $newOptions ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"LocalUserOptionsStoreSave": "MediaWiki\\Extension\\MyExtension\\Hooks::onLocalUserOptionsStoreSave"
}
}
|
Called from: | File(s): user/Options/LocalUserOptionsStore.phpCategory:MediaWiki hooks included in LocalUserOptionsStore.php#LocalUserOptionsStoreSave |
Interface: | LocalUserOptionsStoreSaveHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:LocalUserOptionsStoreSave extensions.
Hook handlers cannot modify the new preferences as the changes have been saved. This will only allow handlers to see the changes in specifically local options storage as opposed to any storge (which would be handled using SaveUserOptions).