public function handler_destroy($sid) {
        if (!$session = $this->database->get_record('sessions', array('sid'=>$sid), 'id, sid')) {
            if ($sid == session_id()) {
                $this->recordid = null;
                $this->lasthash = null;
            }
            return true;
        }

        if ($this->recordid and $session->id == $this->recordid) {
            try {
                $this->database->release_session_lock($this->recordid);
            } catch (\Exception $ex) {
                // Ignore problems.
            }
            $this->recordid = null;
            $this->lasthash = null;
        }

        $this->database->delete_records('sessions', array('id'=>$session->id));

        return true;
    }
public function handler_destroy($sid) {
        if (!$session = $this->database->get_record('sessions', array('sid'=>$sid), 'id, sid')) {
            if ($sid == session_id()) {
                $this->recordid = null;
                $this->lasthash = null;
            }
            return true;
        }

        if ($this->recordid and $session->id == $this->recordid) {
            try {
                $this->database->release_session_lock($this->recordid);
            } catch (\Exception $ex) {
                // Ignore problems.
            }
            $this->recordid = null;
            $this->lasthash = null;
        }

        $this->database->delete_records('sessions', array('id'=>$session->id));

        return true;
    }
public function handler_destroy ( $ sid ) { if ( ! $ session = $ this -> database -> get_record ( 'sessions' , array ( 'sid' => $ sid ) , 'id, sid' ) ) { if ( $ sid == session_id ( ) ) { $ this -> recordid = null ; $ this -> lasthash = null ; } return true ; } if ( $ this -> recordid and $ session -> id == $ this -> recordid ) { try { $ this -> database -> release_session_lock ( $ this -> recordid ) ; } catch ( \ Exception $ ex ) { // Ignore problems. } $ this -> recordid = null ; $ this -> lasthash = null ; } $ this -> database -> delete_records ( 'sessions' , array ( 'id' => $ session -> id ) ) ; return true ; }
Destroy session handler.

{@see http://php.net/manual/en/function.session-set-save-handler.php}

@param string $sid
@return bool success
Destroy session handler .