MediaWiki REL1_37
|
This is a hook handler interface, see docs/Hooks.md. More...
Public Member Functions | |
onUserSaveOptions ( $user, &$options, $originalOptions) | |
This hook is called just before saving user preferences. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "UserSaveOptions" to register handlers implementing this interface.
Definition at line 14 of file UserSaveOptionsHook.php.
MediaWiki\User\Hook\UserSaveOptionsHook::onUserSaveOptions | ( | $user, | |
& | $options, | ||
$originalOptions | |||
) |
This hook is called just before saving user preferences.
Hook handlers can either add or manipulate options, or reset one back to its default to block changing it. Hook handlers are also allowed to abort the process by returning false, e.g. to save to a global profile instead. Compare to the UserSaveSettings hook, which is called after the preferences have been saved.
User | $user | The User for which the options are going to be saved |
array | &$options | The user's options as an associative array, modifiable |
array | $originalOptions | The user's original options being replaced |
Implemented in MediaWiki\HookContainer\HookRunner.