Details
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'];
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 ??