From 12171c0e37ea7333476276c980f4977c0ecf8705 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Wed, 1 May 2019 11:13:28 -0400 Subject: [PATCH] Event Cart: honor the allow_same_participant_emails setting --- CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php b/CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php index a78d34f0263c..45767901189b 100644 --- a/CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php +++ b/CRM/Event/Cart/Form/Checkout/ParticipantsAndPrices.php @@ -151,6 +151,11 @@ public function validate() { } } + // Validate if participant is already registered + if ($event_in_cart->event->allow_same_participant_emails) { + continue; + } + foreach ($event_in_cart->participants as $mer_participant) { $participant_fields = $fields['event'][$event_in_cart->event_id]['participant'][$mer_participant->id]; //TODO what to do when profile responses differ for the same contact?