public static function destroy()
{
$sql = 'DELETE FROM {sessions} WHERE token = ?';
$args = array(self::$session_id);
$sql = Plugins::filter('sessions_clean', $sql, 'destroy', $args);
DB::query($sql, $args);
// get rid of the session cookie, too.
self::cookie(null, -1);
// don't just unset the ID in the current session, wipe it out
unset($_SESSION);
// Don't write this session or cookie
self::$session_changed = false;
self::$session_id = null;
return true;
}