You are here

function authcache_debug_user_login in Authenticated User Page Caching (Authcache) 7.2

Implements hook_user_login().

File

modules/authcache_debug/authcache_debug.module, line 40
Debug widget for Authcache.

Code

function authcache_debug_user_login(&$edit, $account) {
  $cookies['Drupal.authcache.cache_render']['present'] = FALSE;
  $cookies['Drupal.authcache.aucdbg']['present'] = authcache_debug_access();
  if ($cookies['Drupal.authcache.aucdbg']['present']) {
    $cookies['Drupal.authcache.aucdbg']['value'] = isset($_COOKIE['Drupal_authcache_aucdbg']) ? $_COOKIE['Drupal_authcache_aucdbg'] : hexdec(mt_rand(0, 0xffff));
    $cookies['Drupal.authcache.aucdbg']['secure'] = FALSE;
  }
  authcache_add_cookie($cookies);
}