public static function destroySessionIfNotAllowed(){
        if (!self::isAllowedSession() && ini_get("session.use_cookies") && session_status() == PHP_SESSION_ACTIVE) {
            $params = session_get_cookie_params();
            setcookie(session_name(), '', time() - 42000,
                $params["path"], $params["domain"],
                $params["secure"], $params["httponly"]
            );
        }
    }
public static function destroySessionIfNotAllowed(){
        if (!self::isAllowedSession() && ini_get("session.use_cookies") && session_status() == PHP_SESSION_ACTIVE) {
            $params = session_get_cookie_params();
            setcookie(session_name(), '', time() - 42000,
                $params["path"], $params["domain"],
                $params["secure"], $params["httponly"]
            );
        }
    }
public static function destroySessionIfNotAllowed ( ) { if ( ! self :: isAllowedSession ( ) && ini_get ( "session.use_cookies" ) && session_status ( ) == PHP_SESSION_ACTIVE ) { $ params = session_get_cookie_params ( ) ; setcookie ( session_name ( ) , '' , time ( ) - 42000 , $ params [ "path" ] , $ params [ "domain" ] , $ params [ "secure" ] , $ params [ "httponly" ] ) ; } }
Destroys session and session cookies if it is started and not allowed
Destroys session and session cookies if it is started and not allowed