Events Made Easy Forums How do I … How to prevent visitors to book the same event twice with the same email address

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #57290
    Anonymous
    Inactive

    How to prevent visitors to book the same event twice with the same email address

    Is there some function, which can check, if the email address is already registered for that event?
    I have found some code in documentation, but it requires WP membership.
    Is is possible to solve it without WP registration?

    #57291
    Franky
    Keymaster

    Check out the eme_eval_booking_form_post_filter filter example:
    http://www.e-dynamics.be/wordpress/hooks-and-filters/

    #57292
    Anonymous
    Inactive

    I tried that filter, but it checks the whole combo name-surname-email. So if name and surname and email is the same, booking is not possible. But if email is the same, and name is different, it allows to book the event.

    Is it possible to check only the email? Not the whole combo.

    I want to achieve, that if email is already registered for the event, do not allow to book (does not matter what the name is). I do not understand, why the plugin allows multiple bookings for one event for the same email address? Was that an intention?

    #57293
    Franky
    Keymaster

    It is an example, you need to change it to fit your needs. In your case, change

    
        $booker = eme_get_person_by_post();
        if (!empty($booker)) {
           foreach ($attendees as $attendee) {
              if ($attendee['person_id']==$booker['person_id'])
                 $already_registered=1;
           }
        }
    

    to something more simple:

    
           $posted_email = eme_strip_tags($_POST['email']);
           foreach ($attendees as $attendee) {
              if ($attendee['email']==$posted_email)
                 $already_registered=1;
           }
    

    But at the same time: I do admit that this process is cumbersome to do, and I’ll make an option for this. Expect this for the next version to be released this week.

    #57294
    Franky
    Keymaster

    This has been implemented now and will be in the next version. From the changelog:

    Extra RSVP setting per event to optionally require an unique person or email registration

    #57295
    Anonymous
    Inactive

    Franky, thank you very much. That is perfect. Works great!
    Is it possible to tweak it for the “event cancel registration form”?

    #57296
    Franky
    Keymaster

    What do you mean for the event cancel reg form? That will always require the same info to be able to cancel only the relevant bookings (meaning last name/first name and email). Only email there is too dangerous as others might start filling it out and cancel another person’s booking. I never even liked that … maybe when I add a confirmation mail for cancel I could revise that.

    #57301
    Anonymous
    Inactive

    ok, I see the danger now. I leave the cancel form as is.

    The reason behind all of this is, that in Slovakia people sometimes use diacritics and sometimes do not. E.g. name Eliška Rajčáková, is often used also as Eliska Rajcakova or Eliška Rajčakova. Therefore I needed to prevent the same person to book event twice using only email.

    When users want to cancel the booking, they will have to remember exactly how they wrote their name in booking form. If they used diacritics when booking, and they do not when canceling, they get the message: There are no bookings associated to this name and e-mail. So they might get the impression, that there is no booking for their name and cancellation was successful. But actually the booking stays valid.

    #57302
    Franky
    Keymaster

    I understand the problem. I added a generic option to check RSVP without accents when needed (see the EME options page, panel RSVP)

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top