public function clear()
    {
        $session = $this->getSessionContainer();
        if (!$session->isSwitchedUser) {
            return false;
        }

        $oldSession = unserialize($session->session);
        $ref        = $session->ref;
        $_SESSION = $oldSession;

        return $ref ? $ref : true;
    }