lcdservices / CiviCRM-Group-Sync

Two-way synchronize CiviCRM groups with Joomla ACL groups.
4 stars 1 forks source link

Sync doesn't work via Profile Register Form #5

Closed EnesErtugrul closed 9 years ago

EnesErtugrul commented 9 years ago

Hi, I created profiles and Joomla registration is enabled for these forms. So users can register without Joomla's core registeration form but via CiviCRM's profiles forms.

But Sync doesn't work with this scenario.

If user register with Joomla's core registration first, and then fills the profile forms Sync does work without problem. I have Joomla 3.3.4 and CiviCRM 4.6.5 versions.

Thanks

lcdservices commented 9 years ago

Can you detail your setup a bit more -- The component syncs Joomla user groups and CiviCRM groups. I suspect in this case there is a bit of a race condition that we may not be able to work around:

the sync triggers off two events: a civicrm contact being added/removed from a group, and the Joomla user account being saved. but a connection between the two (the contact and user) must exist in order for it to sync.

I don't think we can make it work in the case of a user account created from a profile, because that connection between the two can't be created until both separate records are created -- and at that point we've lost the events we trigger off.

EnesErtugrul commented 9 years ago

Actually I just realised that after I installed the component and set a rule, user is not assigned to the CiviCRM group (which used to work before). So as you said events are lost during the registration via profile form.

So I will get user registrations via Joomla core and then redirect them to the profile registration form. And there is no problem with that, your component works like a charm.

Thanks!