You are here

public static function SessionProxy_Helper::deleteSessionCookie in Session Proxy 7

Deletes the session cookie.

Parameters

string $name: Name of session cookie to delete.

bool $force_insecure: Force cookie to be insecure.

1 call to SessionProxy_Helper::deleteSessionCookie()
SessionProxy_Backend_Base::deleteCurrentSessionCookie in lib/SessionProxy/Backend/Base.php
Delete current session cookie

File

lib/SessionProxy/Helper.php, line 34

Class

SessionProxy_Helper
Static tool container.

Code

public static function deleteSessionCookie($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]);
  }
}