Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.1
-
Fix Version/s: 4.4.8
-
Component/s: Drupal Integration Modules
-
Labels:
-
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!)