MediaWiki REL1_37
MediaWiki\Session\Hook\UserSetCookiesHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Session\Hook\UserSetCookiesHook:

Public Member Functions

 onUserSetCookies ( $user, &$session, &$cookies)
 This hook is called when setting user cookies.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UserSetCookies" to register handlers implementing this interface.

Deprecated:
since 1.27 If you're trying to replace core session cookie handling, you want to create a subclass of MediaWiki\Session\CookieSessionProvider instead. Otherwise, you can no longer count on user data being saved to cookies versus some other mechanism.

Definition at line 18 of file UserSetCookiesHook.php.

Member Function Documentation

◆ onUserSetCookies()

MediaWiki\Session\Hook\UserSetCookiesHook::onUserSetCookies (   $user,
$session,
$cookies 
)

This hook is called when setting user cookies.

Since
1.35
Parameters
User$user
array&$sessionSession array, will be added to the session
string[]&$cookiesCookies array mapping cookie name to its value
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: