| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\User\Options\Hook; |
| 4 | |
| 5 | use MediaWiki\User\UserIdentity; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "LoadUserOptions" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @stable to implement |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 14 | interface LoadUserOptionsHook { |
| 15 | /** |
| 16 | * This hook is called when user options/preferences are being loaded from the database. |
| 17 | * |
| 18 | * @since 1.37 |
| 19 | * |
| 20 | * @param UserIdentity $user |
| 21 | * @param array &$options Options, can be modified. |
| 22 | * @return void This hook must not abort, it must return no value |
| 23 | */ |
| 24 | public function onLoadUserOptions( UserIdentity $user, array &$options ): void; |
| 25 | } |