LLMS_Sessions::end( LLMS_Event $start )

End a session.


Parameters Parameters

$start

(LLMS_Event) (Required) Event object for a session start.


Top ↑

Return Return

(LLMS_Event|WP_Error)


Top ↑

Source Source

File: includes/class-llms-sessions.php

			)
		);

		if ( ! is_wp_error( $end ) ) {
			global $wpdb;
			$wpdb->query(
				$wpdb->prepare(
					"
					DELETE FROM {$wpdb->prefix}lifterlms_events_open_sessions
					WHERE `event_id` = %d
					",
					$start->get( 'id' )
				)
			); // db call ok; no-cache ok.
		}

		return $end;
	}

	/**
	 * Ends the currently active session for the logged in user.
	 *
	 * @since 3.36.0
	 *
	 * @return LLMS_Event|WP_Error|false
	 */
	public function end_current() {


Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Delete open session entry from the wp_lifterlms_events_open_sessions table.
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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