My requirement was to notify all active members of a group when a new user subscribes to the group.

The Event is "User has become a group member" which provides the relevant og-membership.

Normally I would use the Action "Get members from group audience" to loop over the group members and send an email to each.
This works for other events like "After saving new content" as it provides a node which is group content to be passed as the parameter to that action.

However with this event (User has become group member) we don't have group content, we have the group itself.

I tried to extract the group content from the group but this proved unreliable so I think the best solution is to create a new action that accepts the group itself as the parameter.

Note that I have adapted the additional filtering (e.g. member states) from this patch. https://www.drupal.org/node/1859698

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infinet created an issue. See original summary.

infinet’s picture

Potential patch containing the new rule attached.

infinet’s picture

Updated patch to exclude inactive users.