Community role auto-sync: populate field_user_communities from community_ roles

Submitted by admin on
Status
Priority
High
Implement a hook (hook_user_login, hook_user_update) in rsvp_system_module that syncs community_ prefixed Drupal roles to field_user_communities on the user profile. When a user gains/loses a community_ role, the corresponding taxonomy term TID is added/removed from field_user_communities. This keeps UI filtering (form pickers) consistent with Drupal role-based access control without double data-entry. Also set field_primary_community if not already set (use the first community role found). For SSO deployments, this runs at every login so Grouper changes propagate immediately.