public function destroy()
    {
        if (empty($this->oSession)) {
            return $this;
        }

        $oConfig     = Factory::service('Config');
        $sCookieName = $oConfig->item('sess_cookie_name');

        $this->oSession->sess_destroy();

        if (isset($_COOKIE) && array_key_exists($sCookieName, $_COOKIE)) {
            delete_cookie($sCookieName);
            unset($_COOKIE[$sCookieName]);
        }

        return $this;
    }
public function destroy()
    {
        if (empty($this->oSession)) {
            return $this;
        }

        $oConfig     = Factory::service('Config');
        $sCookieName = $oConfig->item('sess_cookie_name');

        $this->oSession->sess_destroy();

        if (isset($_COOKIE) && array_key_exists($sCookieName, $_COOKIE)) {
            delete_cookie($sCookieName);
            unset($_COOKIE[$sCookieName]);
        }

        return $this;
    }
public function destroy ( ) { if ( empty ( $ this -> oSession ) ) { return $ this ; } $ oConfig = Factory :: service ( 'Config' ) ; $ sCookieName = $ oConfig -> item ( 'sess_cookie_name' ) ; $ this -> oSession -> sess_destroy ( ) ; if ( isset ( $ _COOKIE ) && array_key_exists ( $ sCookieName , $ _COOKIE ) ) { delete_cookie ( $ sCookieName ) ; unset ( $ _COOKIE [ $ sCookieName ] ) ; } return $ this ; }
Destroy the user's session

@return $this
Destroy the user s session