Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

Found out this is an existing issue with OG 7.x-1.4: http://drupal.org/node/1572480.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.