LLMS_Session::destroy()

Destroys the current session


Description Description

Removes session data from the database, expires the cookie, and resets class variables.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/class.llms.session.php

99
100
101
102
103
104
105
106
107
108
109
110
111
112
public function destroy() {
 
    // Delete from DB.
    $this->delete( $this->get_id() );
 
    // Reset class vars.
    $this->id       = '';
    $this->data     = array();
    $this->is_clean = true;
 
    // Destroy the cookie.
    return llms_setcookie( $this->cookie, '', time() - YEAR_IN_SECONDS, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $this->use_secure_cookie(), true );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.