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

Civicrm Group Roles Sync: support proper syncing of smart groups as well as static groups

    Details

    • Documentation Required?:
      None

      Description

      Testing out the Civicrm Group Roles sync module, I noticed that I could create rules to sync Smart Groups to Roles, but when a user in that group logs in, the sync never happens. Investigating, it turned out that the group_contact API doesn't currently support returning Smart Groups, although Lobo indicated in IRC that this feature should appear in 4.3.

      I've rolled a simple patch to this module that replaces the group_contact API call in the hook_user_login implementation with a similar contact_get call, filtered by the Smart Group ID. This is probably slightly less efficient, but makes the integration significantly better and less confusing (particularly since the Rule creation UI allows you to select Smart Groups!)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jitendra.purohit Jitendra Purohit
                Reporter:
                dlaventure Derek Laventure
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: