How to hook into group role insert/update?

Created on 12 May 2017, over 7 years ago
Updated 26 March 2021, over 3 years ago

Hello,

I can see that the grolesync module is not working and am trying to figure out how to hook into the process of adding a group role so that I can then add a matching Drupal role. I know how to do everything except hook into the first step (when a user gives a member a particular role - or when a role is assigned). I tried hook_entity_update and it runs but the entity passed is the GroupContent entity and it does not appear that the new roles assigned are in that object. I also tried hook_group_role_update but I do not think that is actually a 'thing'.

If this is even possible, what do I need to call to

1) hook into the process of adding a group role to a group member (or updating roles)
2) get the new/changed role information

Any help would be greatly appreciated.

💬 Support request
Status

Active

Version

1.0

Component

Group (group)

Created by

🇪🇸Spain bletch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024