Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Cannot Reproduce
-
Affects Version/s: 3.2.3
-
Fix Version/s: 3.3.beta
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
If a contact has two or more memberships with varying statuses the memberships are not syncing to drupal roles correctly. This appears to be addressed in this fix (http://issues.civicrm.org/jira/browse/CRM-4285) for 3.2.2, but I am still seeing trouble in 3.2.3. Honestly I am having trouble unraveling the issue, but a simple change in civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module seems to get the correct results:
— orig 2010-11-05 16:19:31.000000000 -0600
+++ new 2010-11-05 16:19:31.000000000 -0600
@@ -510,8 +510,8 @@ function _civicrm_member_roles_sync($ext
if ( $removeRule ) $expiredRoleIds[$rid] = $rid;
}
//Apply roles.
- foreach ( $currentRoleIds as $role ) user_multiple_role_edit($addAccount, 'add_role', $role);
foreach ( $expiredRoleIds as $role ) user_multiple_role_edit($removeAccount, 'remove_role', $role);
+ foreach ( $currentRoleIds as $role ) user_multiple_role_edit($addAccount, 'add_role', $role);
}
return TRUE;
}