< Manual:Hooks 
 
      |  | This feature was removed from MediaWiki core in version 1.38.0 (after being deprecated in 1.37.0). Please see LoadUserOptions for an alternative way to use this feature. | 
| UserLoadOptions | |
|---|---|
| Available from version 1.16.0 Removed in version 1.38.0 When user options/preferences are being loaded from the database. | |
| Define function: | public static function onUserLoadOptions( User $user, &$options ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"UserLoadOptions": "MyExtensionHooks::onUserLoadOptions"
	}
}
 | 
| Called from: | File(s): User.php | 
| Interface: | UserLoadOptionsHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UserLoadOptions extensions.
Details
- $user: User object
- &$options: Options, can be modified.
See also
- Hooks/UserSaveOptions
- Hooks/UserSaveSettings
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.