Email all Organic Group members when a subgroup is created I have an Organic Groups / subgroups structure where an Organisation is a group, a Property is a child group of an Organisation, and a claim is a child group of a property. So:
Organisation > Property > Claim
Each subgroup is set to inherit its parents users

When a new Property is created, I can use rules to 'Get group members from group audience' to email all of the members of the group: 

However when a new Claim is created the same rule only emails the user who created the Claim. I think that this might be because inherited users are handled differently from normal users. You can see this by going into the 'group' tab on the claim and then clicking on people:



We can see in the screenshot above that there are three inherited users, but only the user who created the node will be emailed, the other two will not.

How should I email the inherited users when subgroups like Claim are created?

-- Addition --

og_subgroups.views.inc is used to create the view shown above. The contents of this file are:

function og_subgroups_views_pre_render(&amp;$view) {
  if ($view-&gt;name == 'og_members_admin') {
    // Add an overview of the users that are inherited from parent groups.
    $inherited_users = _og_subgroups_get_inherited_users($view-&gt;args[0], $view-&gt;args[1]);
    $header = array('Name', 'Inherited from');
    $rows = array();
    $membership_states = og_group_content_states();
    if (!empty($inherited_users)) {
      foreach ($inherited_users as $inherited_uid =&gt; $data) {
        $row = array();
        $row[] = l($data[0]['user']-&gt;name, 'user/' . $inherited_uid);
        $inherited_from = array();
        foreach ($data as $inheritance) {
          $inherited_from[] = t('!parent (@roles)', array(
            '!parent' =&gt; l(entity_label($inheritance['inherited_from']['type'], $inheritance['inherited_from']['entity']), 'group/' . $inheritance['inherited_from']['type'] . '/' . $inheritance['inherited_from']['id'] . '/admin/people'),
        '@roles' =&gt; implode(', ', $inheritance['roles']),
      ));
    }
    $row[] = implode(', ', $inherited_from);
    $rows[] = $row;
  }
}
$view-&gt;attachment_after = theme('table', array(
  'caption' =&gt; t('Inherited users'),
  'header' =&gt; $header,
  'rows' =&gt; $rows,
  'empty' =&gt; t('No inherited users.'),
));
  }
}


It would be great if someone could suggest how I might be able to use the above code in rules. It would be great if I could use'Execute custom PHP code' and use something like

$inherited_users = _og_subgroups_get_inherited_users($view-&gt;args[0], $view-&gt;args[1]);


but that doesn't work in a custom PHP block in Rules. I can see the function _og_subgroups_get_inherited_users in og_subgroups.common.inc and am not sure if I can use this code to help.

Using Organic Groups 7.x-2.7 and Organic groups subgroups 7.x-2.0-beta1
I managed to use make a custom rules file for OG Subgroups that achieves what I need it to. It adds the rule 'Get subgroup group members from group audience' to a 'Custom' rule group:



This makes the users of the subgroup available to rules. You can then loop through the users and send an email to each of them:



In order to do this I created  custom 'og_subgroups.rules.inc' file in the root of the OG subgroups module. This is the code I used inside it:

&lt;?php

/****************
Adds the ability to get the members of the parent group from a subgroup using rules
/****************


/**
 * Implements hook_rules_action_info().
 */
function og_subgroups_rules_action_info() {
  $items = array();

  $items['og_subgroups_get_members'] = array(
    'label' =&gt; t('Get subgroup group members from group audience'),
    'group' =&gt; t('Custom'),
    'parameter' =&gt; array(
      'group_content' =&gt; array(
        'type' =&gt; 'entity',
        'label' =&gt; t('Group content'),
        'description' =&gt; t('The group content determining the group audience.'),
      ),
    ),
    'provides' =&gt; array(
      'group_members' =&gt; array('type' =&gt; 'list&lt;user&gt;', 'label' =&gt; t('List of subgroup members')),
    ),
    'base' =&gt; 'og_subgroups_rules_get_members',
    'access callback' =&gt; 'og_subgroups_rules_integration_access',
  );

  return $items;
}


/* NEW FUNCTION ************************************************/

// This callback creates the hashed string by using the parameters provided through rules' UI
function og_subgroups_rules_get_members($group_content) {

// get the nid from the passed value of the content being added
$nid = $group_content-&gt;nid-&gt;value();

// trying to manually call the get inherited users function from og_subgroups.common.inc
$inherited_users = _og_subgroups_get_inherited_users("node", $nid);

$members = array();

foreach ($inherited_users as $inherited_uid =&gt; $data) {
  // Get the group members the group content belongs to.

  $user=user_load($inherited_uid);

  // push the returned user to the array of members
  array_push($members, $user);

}



// return the users  
  return array('group_members' =&gt; $members);

}

/**
 * OG Rules integration access callback.
 */
function og_subgroups_rules_integration_access($type, $name) {
  // Grant everyone access to conditions.
  return $type == 'condition' || user_access('administer group');
}


For those of you who prefer patches here is the patch I created: Patch on drupal.org