You are here

function esi__set_user_contexts in ESI: Edge Side Includes 7.3

Set the cookies to track current ESI contexts.

2 calls to esi__set_user_contexts()
esi_boot in ./esi.module
Implements hook_boot().
esi_user_login in ./esi.module
Implements hook_user_login().

File

./esi.module, line 386
Adds support for ESI (Edge-Side-Include) integration, allowing components\ to be delivered by ESI, with support for per-component cache times.

Code

function esi__set_user_contexts($account) {
  $cookie_data = esi__get_cookie_data($account);

  // Transmit the cookies.
  foreach ($cookie_data as $cookie) {
    setcookie($cookie['name'], $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httponly']);
  }
}