LLMS_Sessions::get_session_end( LLMS_Event $start )
Retrieve session end record for by session id.
Parameters Parameters
- $start
-
(LLMS_Event) (Required) Event record for the session.start event.
Return Return
(LLMS_Event|end)
Source Source
File: includes/class-llms-sessions.php
public function get_session_end( $start ) { global $wpdb; $end = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}lifterlms_events WHERE actor_id = %d AND object_id = %d AND object_type = 'session' AND event_type = 'session' AND event_action = 'end' ORDER BY date DESC LIMIT 1;", $start->get( 'actor_id' ), $start->get( 'object_id' ) ) ); // db call ok; no-cache ok. if ( ! $end ) { return null; } return new LLMS_Event( $end ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.36.0 | Introduced. |