I'm trying to add a "restricted" group membership type to only show teasers of a content type to some members. I'm calling the following function from a Rules action; however, the membership ends up being a OG_MEMBERSHIP_TYPE_DEFAULT.
function mymodule_subscribe_restricted($account, $group) {
og_group($group->gid, array('entity type' => 'user',
'entity' => $account,
'state' => OG_STATE_ACTIVE,
'membership type' => MYMODULE_OG_RESTRICTED));
}
Looking at the source code of og_group(), the membership type should go through. And it's defined correctly in the db table og_membership_type.
Any quick pointers or should I just refactor the whole thing to use a separate group role instead of a membership type?