displayed_user->id,'edit_events') ){ ?>

$bp->displayed_user->id)); if( count($events) > 0 ){ $args = array( 'format_header' => get_option('dbem_bp_events_list_format_header'), 'format' => get_option('dbem_bp_events_list_format'), 'format_footer' => get_option('dbem_bp_events_list_format_footer'), 'owner' => $bp->displayed_user->id ); echo EM_Events::output($events, $args); }else{ ?>

.

displayed_user->id ); $EM_Bookings = $EM_Person->get_bookings(); if(count($EM_Bookings->bookings) > 0){ //Get events here in one query to speed things up $event_ids = array(); foreach($EM_Bookings as $EM_Booking){ $event_ids[] = $EM_Booking->event_id; } echo EM_Events::output(array('event'=>$event_ids)); }else{ ?>