CRM-11888 Duplicate registrations for the same role unless the role is default.

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.7
    • Fix Version/s: 4.3.0
    • Component/s: CiviEvent
    • Labels:

      Description

      Joomla 2.5.*
      CiviCRM 4.2.* (up to 4.2.7 at time of forum post)

      ISSUE
      Only the default role set in the event management configuration will recognise duplicate participants.

      RECREATE (I have recreated in http://joomla.demo.civicrm.org)
      1. Add 'role select' to a profile
      2. Add role profile to event configuration
      3. Register multiple times with a role other than the default set in the event management.
      4. Register with the default role
      5. Now try and register again with any role and duplicate will be recognised.

      THE FIX (for 4.2.7)

      /CRM/Event/Form/Registration/Register.php

      LINE: 1457

      FIND
      $participant->role_id = $self->_values['event']['default_role_id'];

      REPLACE WITH
      $participant->role_id = $self->_values['event']['role_id'];

        Attachments

          Activity

          [CRM-11888] Duplicate registrations for the same role unless the role is default.
          David Greenberg added a comment -

          I can't think of a reason why we would allow dupe reg for non-default role, altho the code looks deliberate? Maybe svn blame to see who wrote that in case they can shed light. I do think we want to / and currently do allow participant A to register multiple times w/ different roles (i.e. as Speaker AND as Attendee). But I think the reporter is saying they could register twice as speaker ??

          Generic added a comment -

          Hi David, yes you can register twice or more with any role other than the default for the event. The biggest issue with allowing multiple registrations under the same role / different role, is when someone uses one email to register on the behalf of other participants (a PA for example). We had 11 different participants registered all with the same email but only 1 contact was created, this contact was then updated 10 times. I also agree with having the option for multiple role registration but this should be an option in the event configuration or maybe a solution would be to change the role select option to multiple select option for the form profile, this would allow multiple role selection at a single registration. I prefer the role select as they are as I have been using the roles to determine the price using Jquery, for example: member, non-member. Selecting member also forces login.

          Generic added a comment -

          Also participant A cannot at the moment register multiple times with different roles once they have already registered with the default role.

          Ravish Nair added a comment -

          checked in r45641

          Generic added a comment -

          The fix works until the user logs in, then regardless of what role the Oops! message is shown disallowing the user the register with another role.

          I still think the multiple role registration needs work.
          Its too easy for someone to use a single email address and register one or more participants which will result in only the last participants contact record being captured.

          Some suggestions:

          1. Add a notice such as: "you are already registered as a XXX if you would like to register with an additional role click continue"
          2. Add multiple role select as an option for the form profile.

          <b>In my case I would like to disable multiple role registration so is my above code change any good to achieve this?</b>

          David Greenberg added a comment -

          Generic - Agree that the logged in behavior isn't consistent. Your #1 suggestion makes sense for this - but the code would need to verify if the participant_role select is included in the registration form (via profile) before giving the user that option. Would be good to have this improvement for 4.4 if you're up for submitting a patch. (A patch for multiple role select option would also be cool.)

            People

            • Assignee:
              Ravish Nair
              Reporter:
              Generic

              Dates

              • Created:
                Updated:
                Resolved: