Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6054401
SaveUserOptionsHook.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
SaveUserOptionsHook.php
View Options
<?php
namespace
MediaWiki\User\Options\Hook
;
use
MediaWiki\User\UserIdentity
;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "SaveUserOptions" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface
SaveUserOptionsHook
{
/**
* This hook is called just before saving user preferences.
*
* Hook handlers can either add or manipulate options, or reset one back to its default
* to block changing it. Hook handlers are also allowed to abort the process by returning
* false, e.g. to save to a global profile instead. Compare to the UserSaveSettings
* hook, which is called after the preferences have been saved.
*
* @since 1.37
*
* @param UserIdentity $user The user for which the options are going to be saved
* @param array &$modifiedOptions The user's options as an associative array, modifiable.
* To reset the preference value to default, set the preference to null.
* To block the preference from changing, unset the key from the array.
* To modify a preference value, set a new value.
* @param array $originalOptions The user's original options being replaced
* @return bool|void True or no return value to continue or false to abort
*/
public
function
onSaveUserOptions
(
UserIdentity
$user
,
array
&
$modifiedOptions
,
array
$originalOptions
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 00:14 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
10/04/03e48ffdd4116184adcbd3bd1ea9
Default Alt Text
SaveUserOptionsHook.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment