Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow second participant registration with same email, when enabled #24684

Conversation

larssandergreen
Copy link
Contributor

@larssandergreen larssandergreen commented Oct 7, 2022

Overview

When "Same email address" is enabled for an event, participants with the same email address as an existing participant should be allowed to register. They were, when they were the primary participant, but not when they were an additional participant.

Before

Attempting to register an additional participant with an email address for an existing participant results in an error, and the registration cannot not be completed without changing or skipping the participant.

After

No error, registration proceeds as normal.
If "Same email address" isn't enabled, no change.

@civibot
Copy link

civibot bot commented Oct 7, 2022

(Standard links)

@civibot civibot bot added the master label Oct 7, 2022
@demeritcowboy
Copy link
Contributor

The intent of the original seems to be to prevent the same contact being registered twice, regardless of the email setting. It looks like it uses the dedupe rule you choose on the event config to determine this. While the existing restrictions seem a bit iffy it seems like this is a bigger change than just allowing a different participant with the same email?

@larssandergreen
Copy link
Contributor Author

Preventing the same contact from being registered twice does seem to be the intent of the original. But if Same email address is checked, we allow a contact who is already registered to register again as the primary participant, so we should also allow this for the additional participants. This change is just making the logic consistent for primary and additional participants.

You could definitely argue that these should be two different settings (Same email address and Allow multiple registrations), but that's a bigger change and would open a whole other can of worms (what do you do if you have an email-only dedupe rule, don't allow same email, but do allow multiple registrations, etc). I also have a PR to clarify what this setting does.

@demeritcowboy
Copy link
Contributor

Let me look at the history. Maybe there is something interesting there.

@demeritcowboy demeritcowboy added the merge ready PR will be merged after a few days if there are no objections label Oct 7, 2022
@demeritcowboy
Copy link
Contributor

Ok:

  • The dedupe rule was a bit of a red-herring because the participants may not even exist yet as contacts in which case it doesn't find them anyway.
  • The only use-case I can see in the history is, paraphrasing: "The primary user often does something silly like registers themselves both as primary and additional participant, so we want to prevent that." There is an additional check lower down though that still catches this if they use the same first+last name.

@larssandergreen
Copy link
Contributor Author

Thanks @demeritcowboy. Yes, I think the first + last check is a more appropriate method to prevent people from registering themselves twice on the same form.

@agileware-justin
Copy link
Contributor

agileware-justin commented Oct 7, 2022

Agree with this PR.

Will need CIviCRM documentation updates as well, when merged.

@larssandergreen
Copy link
Contributor Author

@agileware-justin I think the documentation as it stands now covers this.

@demeritcowboy demeritcowboy merged commit 7b322ca into civicrm:master Oct 11, 2022
@larssandergreen larssandergreen deleted the allow-second-participant-registration-when-contact-already-registered branch November 5, 2022 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants