Manual:Hooks/UserGetDefaultOptions

From MediaWiki.org
Jump to: navigation, search
UserGetDefaultOptions
Available from version 1.18.0 (r97365)
Called after fetching the core default user options.

Define function:
public static function onUserGetDefaultOptions( &$defaultOptions ) { ... }

Attach hook:
$wgHooks['UserGetDefaultOptions'][] = 'MyExtensionHooks::onUserGetDefaultOptions';
Called from: User.php

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


[edit] Details

This hook is ran right before returning the options to the caller.

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

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox