function _drupal_session_delete_cookie in Memcache Storage 7
Deletes the session cookie.
Parameters
$name: Name of session cookie to delete.
boolean $secure: Force the secure value of the cookie.
1 call to _drupal_session_delete_cookie()
- _drupal_session_destroy in includes/
session.inc - Session handler assigned by session_set_save_handler().
File
- includes/
session.inc, line 468 - User session handling functions.
Code
function _drupal_session_delete_cookie($name, $secure = NULL) {
global $is_https;
if (isset($_COOKIE[$name]) || !$is_https && $secure === TRUE) {
$params = session_get_cookie_params();
if ($secure !== NULL) {
$params['secure'] = $secure;
}
setcookie($name, '', REQUEST_TIME - 3600, $params['path'], $params['domain'], $params['secure'], $params['httponly']);
unset($_COOKIE[$name]);
}
}