Index: og_user_roles.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/og_user_roles/og_user_roles.module,v retrieving revision 1.36 diff -u -p -r1.36 og_user_roles.module --- og_user_roles.module 8 Jun 2009 12:57:47 -0000 1.36 +++ og_user_roles.module 5 Dec 2009 15:29:14 -0000 @@ -122,6 +122,14 @@ function og_user_roles_init() { // Try to determine group context using customized menu system functions. $group_node = og_user_roles_determine_context(); + + // If our code did not identify a context, get the custom context set through + // the organic groups API. This allows for use of extended context support + // from organic groups. + if (empty($group_node)) { + $group_node = og_get_group_context(); + } + // Assign additional user roles to current user (if any). og_user_roles_grant_roles($user, $group_node); }