Organic Groups - How do I set a default role for new group members? I have created a custom group role with some custom permissions and I am trying to find a way to allocate this role to group members by default. Ideally I would like every member of every group to be allocated this role, and be able to remove this role from a user if I no longer want the particular user to have my custom permissions.

I believe OG User Roles had this functionality and user roles were put into core organic groups for 7 but I am not sure if this default roles functionality was also implemented?
I found a solution to this by using og_role_grant within hook_og_membership_insert and hard coding my role in there. This works by granting the role to a user who has just been added as a member of a group.
If I had more time I would create myself a form in the backend so it wouldn't be hard coded but for now this seems to work fine.

function MODULENAME_og_membership_insert(OgMembership $og_membership) {

  if('user' == $og_membership-&gt;entity_type &amp;&amp; is_numeric($og_membership-&gt;etid)){
    $roles = og_roles($og_membership-&gt;gid);
    foreach($roles as $key =&gt; $value){
      if ('ROLE_NAME' == $value) {
        og_role_grant($og_membership-&gt;gid, $og_membership-&gt;etid, $key);
      }
    }
  }
}