You are here

function _drupal_session_delete_cookie in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/memcache/unstable/memcache-session.inc \_drupal_session_delete_cookie()

Deletes the session cookie.

Parameters

$name: Name of session cookie to delete.

$force_insecure: Fornce cookie to be insecure.

1 call to _drupal_session_delete_cookie()
_drupal_session_destroy in modules/memcache/unstable/memcache-session.inc
Called by PHP session handling with the PHP session ID to end a user's session.

File

modules/memcache/unstable/memcache-session.inc, line 406

Code

function _drupal_session_delete_cookie($name, $force_insecure = FALSE) {
  if (isset($_COOKIE[$name])) {
    $params = session_get_cookie_params();
    setcookie($name, '', REQUEST_TIME - 3600, $params['path'], $params['domain'], !$force_insecure && $params['secure'], $params['httponly']);
    unset($_COOKIE[$name]);
  }
}