Handbuch:Hooks/UserResetAllOptions

This page is a translated version of the page Manual:Hooks/UserResetAllOptions and the translation is 29% complete.
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; see User::resetOptions for possible values.