Title: Limit Booking for Users
Last modified: July 28, 2026

---

# Limit Booking for Users

 *  [crawpappy](https://wordpress.org/support/users/crawpappy/)
 * (@crawpappy)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/limit-booking-for-users/)
 * Is it possible to limit users to 1 event booked at a time? This should apply 
   across all available events in the system, not just a singular event with multiple
   occurrences.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/limit-booking-for-users/#post-18978573)
 * You could use the following code snippet to restrict users to 1 event booking
   at a time (it won’t work for guest signups).
 *     ```wp-block-code
       add_filter('em_booking_validate', 'restrict_user_to_one_booking_total', 10, 2);function restrict_user_to_one_booking_total($result, $EM_Booking) {    // Only apply if the user is logged in    if (!is_user_logged_in()) {        return $result;    }    // Skip check for admins    if (current_user_can('manage_options')) {        return $result;    }    global $wpdb;    $table_bookings = $wpdb->prefix . 'em_bookings';    $current_user_id = get_current_user_id();    // Check for existing bookings that are pending (0, 5) or confirmed (1)    // We ignore rejected (2) and cancelled (3)    $active_booking_count = $wpdb->get_var($wpdb->prepare(        "SELECT COUNT(*) FROM $table_bookings          WHERE person_id = %d          AND booking_status IN (0, 1, 5)",         $current_user_id    ));    if ($active_booking_count > 0) {        $EM_Booking->add_error('You already have an existing event booking. You are limited to one active booking at a time.');        return false;    }    return $result;}
       ```
   
 * You can use the [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   plugin to add this code snippet.
 *  [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * (@joneiseman)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/limit-booking-for-users/#post-18978820)
 * Here’s an updated version of the code snippet that only checks for bookings on
   future events (that were not canceled).
 *     ```wp-block-code
       add_filter('em_booking_validate', 'restrict_user_to_one_future_booking', 10, 2);function restrict_user_to_one_future_booking($result, $EM_Booking) {    // Only apply if the user is logged in    if (!is_user_logged_in()) {        return $result;    }    // Skip check for admins/editors    if (current_user_can('manage_options')) {        return $result;    }    global $wpdb;    $table_bookings = $wpdb->prefix . 'em_bookings';    $table_events   = $wpdb->prefix . 'em_events';    $current_user_id = get_current_user_id();    $today = date('Y-m-d');    // Counts bookings only if:    // 1. The booking status is pending (0, 5) or confirmed (1)    // 2. The event date is today or in the future    // 3. The event itself is marked as active (status 1)    $active_booking_count = $wpdb->get_var($wpdb->prepare(        "SELECT COUNT(*)          FROM $table_bookings b         INNER JOIN $table_events e ON b.event_id = e.event_id         WHERE b.person_id = %d          AND b.booking_status IN (0, 1, 5)         AND e.event_start_date >= %s         AND e.event_status = 1",         $current_user_id,        $today    ));    if ($active_booking_count > 0) {        $EM_Booking->add_error('You already have an existing booking for a future event. You are limited to one active future booking at a time.');        return false;    }    return $result;}
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flimit-booking-for-users%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [joneiseman](https://wordpress.org/support/users/joneiseman/)
 * Last activity: [1 week, 3 days ago](https://wordpress.org/support/topic/limit-booking-for-users/#post-18978820)
 * Status: not resolved