MediaWiki  master
MediaWiki\User\Hook\UserResetAllOptionsHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\User\Hook\UserResetAllOptionsHook:

Public Member Functions

 onUserResetAllOptions ( $user, &$newOptions, $options, $resetKinds)
 This hook is called when user preferences have been requested to be reset. More...
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UserResetAllOptions" to register handlers implementing this interface.

Stable to implement

Definition at line 14 of file UserResetAllOptionsHook.php.

Member Function Documentation

◆ onUserResetAllOptions()

MediaWiki\User\Hook\UserResetAllOptionsHook::onUserResetAllOptions (   $user,
$newOptions,
  $options,
  $resetKinds 
)

This hook is called when user preferences have been requested to be reset.

This hook can be used to exclude certain options from being reset even when the user has requested that all preferences to be reset, because certain options might be stored in the user_properties database table despite not being visible and editable via Special:Preferences.

Since
1.35
Parameters
User$userThe user whose preferences are being reset
array&$newOptionsArray of new (site default) preferences
array$optionsArray of the user's old preferences
string[]$resetKindsArray containing the kinds of preferences to reset
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: