Handbuch:Hooks/UserResetAllOptions
Appearance
Diese Funktion wurde in der Version 1.38.0 vollständig entfernt (nachdem sie seit 1.37.0 veraltet war). |
UserResetAllOptions | |
---|---|
Erhältlich ab Version 1.24.0 (Gerrit change 144689) Entfernt in Version 1.38.0 (Gerrit change 723014) Allows changing the behavior when a user's preferences are reset. For instance, certain preferences can be preserved. | |
Funktion definieren: | public static function onUserResetAllOptions( User $user, array &$newOptions, array $oldOptions, $resetKinds ] ); ) { ... }
|
Haken anbringen: | In extension.json:
{
"Hooks": {
"UserResetAllOptions": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserResetAllOptions"
}
}
|
Angerufen von: | Datei(en): User.php Funktion(en): User::resetOptions |
Interface: | UserResetAllOptionsHook.php |
For more information about attaching hooks, see Handbuch:Hooks .
For examples of extensions using this hook, see Category:UserResetAllOptions extensions/de.
Details
User $user
: User whose preferences are being reset.array &$newOptions
: New preferences as associative array.array $oldOptions
: Old preferences as associative array.array|string resetKinds
: Kinds of preferences to reset as an array or string; seeUser::resetOptions
for possible values.