diff --git a/og.module b/og.module index dac0ab7..629982a 100644 --- a/og.module +++ b/og.module @@ -3152,6 +3152,11 @@ function og_role_change_permissions($rid, array $permissions = array()) { */ function og_role_grant_permissions($rid, array $permissions = array()) { $modules = array(); + + // We should to flush the static cache for the "og_get_permissions()" + // function, before we would try to get all "og" permissions. + drupal_static_reset('og_get_permissions'); + foreach (og_get_permissions() as $name => $value) { $modules[$name] = $value['module']; }