Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21185

Shouldn't participant 'create registration' check for allow duplicate contact?

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.20
    • Fix Version/s: None
    • Component/s: CiviEvent
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Since events have a column allowing/prohibiting duplicate Event registration per contact, shouldn't 'register new event' and 'register with credit card' (accessible from contact/events) also check that bit, and allow a duplicate registration if event.allow_same_participant_emails is set?  If so, the fix is a couple of lines in Participant.php as below (added line 860, modified line 867):

      line 859      $eventId = CRM_Utils_Array::value('event_id', $values);
      line 860      $allow_dupe_reg = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $eventId, 'allow_same_participant_emails');
            //need to get value from event ALLOWING dup - event.allow_same_participant_emails == TRUE
            if (!empty($contactId) && !empty($eventId)) {
              $dupeCheck = new CRM_Event_BAO_Participant();
              $dupeCheck->contact_id = $contactId;
              $dupeCheck->event_id = $eventId;
              $dupeCheck->find(TRUE);
      line 867        if (!empty($dupeCheck->id) && !$allow_dupe_reg ) {

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zorgalina Zorga Lina
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified