public function destroy($reason)
    {

        // check if the session has already been destroyed
        if ($this->getId() != null) {
            // create a new cookie with the session values
            $cookie = new HttpCookie(
                $this->getName(),
                $this->getId(),
                $this->getLifetime(),
                $this->getMaximumAge(),
                $this->getDomain(),
                $this->getPath(),
                $this->isSecure(),
                $this->isHttpOnly()
            );

            // let the cookie expire
            $cookie->expire();

            // and add it to the response
            $this->getResponse()->addCookie($cookie);
        }

        // reset the requested session ID in the request
        $this->getRequest()->setRequestedSessionId(null);

        // destroy the sessions data
        parent::destroy($reason);
    }