0

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?

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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