function _drupal_session_delete_cookie
7.x session.inc | _drupal_session_delete_cookie($name, $secure = NULL) |
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 drupal-7.x/
includes/ session.inc - Session handler assigned by session_set_save_handler().
File
- drupal-7.x/
includes/ session.inc, line 459 - 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]);
}
}