Gdn_Session::end PHP Method

end() public method

End a session
public end ( Gdn_Authenticator $Authenticator = null )
$Authenticator Gdn_Authenticator
    public function end($Authenticator = null)
    {
        if ($Authenticator == null) {
            $Authenticator = Gdn::authenticator();
        }
        if ($this->UserID) {
            Logger::event('session_end', Logger::INFO, 'Session ended for {username}.');
        }
        $Authenticator->authenticateWith()->deauthenticate();
        $this->setCookie('-Vv', null, -3600);
        $this->setCookie('-sid', null, -3600);
        $this->setCookie('-tk', null, -3600);
        Gdn::PluginManager()->CallEventHandlers($this, 'Gdn_Session', 'End');
        $this->UserID = 0;
        $this->User = false;
        $this->_Attributes = array();
        $this->_Preferences = array();
        $this->_TransientKey = false;
        $this->timeZone = null;
    }