This works brilliantly - thank you could I ask how I would go about adding organic group group specific roles https://www.drupal.org/project/og_user_roles Basically a user could be a content creator for Group A, but just a member of Group B, C and D. This means that she could add content in group A but would have this denied if in another group (even if they are a plain member

Comments

artatac created an issue.

artatac’s picture

so I can learn I tried

function bodyclasses_bodyclasses_user_role(&$variables) {
  if (isset($variables['user']) && isset($variables['user']->og_roles)) {
    return $variables['user']->og_roles;
  }
  else {
    return array('anonymous-user');

but no luck