From 87e13d7a6e5146e9df6c0a4d1fb66576f12ba743 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Thu, 6 Oct 2022 18:30:18 -0600 Subject: [PATCH] Allow second participant who has an existing email when same email checked --- CRM/Event/Form/Registration/AdditionalParticipant.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CRM/Event/Form/Registration/AdditionalParticipant.php b/CRM/Event/Form/Registration/AdditionalParticipant.php index 587332cf65..fb9989b880 100644 --- a/CRM/Event/Form/Registration/AdditionalParticipant.php +++ b/CRM/Event/Form/Registration/AdditionalParticipant.php @@ -388,12 +388,9 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R CRM_Event_Form_Registration_Register::checkProfileComplete($fields, $errors, $self->_eventId); //Additional Participant can also register for an event only once - $isRegistered = CRM_Event_Form_Registration_Register::checkRegistration($fields, $self, TRUE); - if ($isRegistered) { - if ($self->_values['event']['allow_same_participant_emails']) { - $errors['_qf_default'] = ts('A person is already registered for this event.'); - } - else { + if (!$self->_values['event']['allow_same_participant_emails']) { + $isRegistered = CRM_Event_Form_Registration_Register::checkRegistration($fields, $self, TRUE); + if ($isRegistered) { $errors["email-{$self->_bltID}"] = ts('A person with this email address is already registered for this event.'); } } -- 2.25.1