Events Made Easy › Forums › How do I … › How to prevent visitors to book the same event twice with the same email address
Tagged: booking, double, registration
- This topic has 8 replies, 2 voices, and was last updated 6 years, 10 months ago by Franky.
-
AuthorPosts
-
Wed 3 Jan 2018 at 19:49 #57290AnonymousInactive
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?Wed 3 Jan 2018 at 21:54 #57291FrankyKeymasterCheck out the eme_eval_booking_form_post_filter filter example:
http://www.e-dynamics.be/wordpress/hooks-and-filters/Thu 4 Jan 2018 at 00:44 #57292AnonymousInactiveI 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?
Thu 4 Jan 2018 at 08:45 #57293FrankyKeymasterIt 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.
Thu 4 Jan 2018 at 13:29 #57294FrankyKeymasterThis 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
Thu 4 Jan 2018 at 13:36 #57295AnonymousInactiveFranky, thank you very much. That is perfect. Works great!
Is it possible to tweak it for the “event cancel registration form”?Thu 4 Jan 2018 at 13:47 #57296FrankyKeymasterWhat 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.
Thu 4 Jan 2018 at 18:29 #57301AnonymousInactiveok, 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.
Thu 4 Jan 2018 at 23:01 #57302FrankyKeymasterI understand the problem. I added a generic option to check RSVP without accents when needed (see the EME options page, panel RSVP)
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.