Available from version 1.18.0 (r97365)
Called after fetching the core default user options.
Define function:
public static function onUserGetDefaultOptions( &$defaultOptions ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"UserGetDefaultOptions": "MyExtensionHooks::onUserGetDefaultOptions"

For MediaWiki ≤1.25:

$wgHooks['UserGetDefaultOptions'][] = 'MyExtensionHooks::onUserGetDefaultOptions';
Called from:File(s): User.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UserGetDefaultOptions extensions.


This hook is run just before returning the options to the caller.

  • &$defaultOptions: Array of preference keys and their default values.

See alsoEdit