Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.1.5, 3.1.6, 3.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0, 3.3.1, 3.3.2
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
The CiviMember Roles Sync module only supports three options for synchronization:
1. Drupal cron
2. Login/logout
3. Manual
None of those options are ideal, especially when dealing with roles that provide access based on membership (i.e. forums, content, etc.). If an expired member wants to renew, they need to wait (or login/logout) after renewing. Using cron causes problems when there are thousands of users and members. MySQL requires more memory, thrashes the disk, occasionally cron doesn't finish, and the query cache prunes/day is in the millions. We have munin data and logs to back this claim up. Forcing (or expecting) a member to login/logout puts an unnecessary burden on the user. Manual sync is obviously a pain from an administrator role.
The patch attached provides a fourth option: "on-demand" sync when the membership changes. When a membership is updated, it immediately syncs for that user. This drastically reduces load on database and improves workflow.
The patch was generated from the 3.3.3 source tree.