Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Apologies if this is a duplicate, or a misunderstanding, but a use case I'm working with is to allow users to select from a handful of site-wide groups, and change from one to the other as needed. During user registration, this works fine, a user can select which group to join. However, once a member of the site, they are denied access to edit this field by the following logic in og_field_access
:
$field = field_info_field($field_name);
$settings = $field['settings']['handler_settings'];
// Check if we are editing the user entity.
if ($entity_type == 'user') {
return user_access('administer group', $account);
}
}
Note that the $field
and $settings
variables are not used in this function, which made me wonder if this logic is incomplete.
Pointers would be greatly appreciated.