/** * logout by destroying the session */ public static function logout() { if (!self::$testMode) { // This is handled by cascading delete in database schema // This way if the GC deletes the session the event subscriptions will // be cleaned up // $userId = self::getUserId(); // if (isset($userId)) // { // // Unsubscribe from all events // $pdo = new EventServicePDO(); // $pdo->unsubscribeForUser($userId); // } /* * NO_ZEBRA_SESSION $_SESSION = array(); // destroy all of the session * variables session_destroy(); */ $link = mysqliConnect(); $session = new Zebra_Session($link, SESSION_HASH, SESSION_LIFETIME_SECONDS); $session->stop(); self::$xactSession = NULL; } }