Problem

The group membership content enable plugin group/src/Plugin/GroupContentEnabler/GroupMembership.php has this annotation:

*   reference_label = @Translation("Username"),
 *   reference_description = @Translation("The name of the user you want to make a member"),

This is used in the GroupContent class to describe a field that references a user:

      $fields['entity_id'] = BaseFieldDefinition::create('entity_reference')
        ->setLabel($plugin->getEntityReferenceLabel() ?: $original->getLabel())
        ->setDescription($plugin->getEntityReferenceDescription() ?: $original->getDescription())

Describing this field as a username is arguably inaccurate, and possibly confusing if a widget is used that doesn't use usernames.

Solution

I would suggest:

*   reference_label = @Translation("User"),
*   reference_description = @Translation("The user you want to make a member"),

Comments

jonathanshaw created an issue. See original summary.

phpkhursheed’s picture

Hi @jonathanshaw,

I have made the changes as per your above suggestion. Please review it once.

phpkhursheed’s picture

Status: Active » Needs review
jonathanshaw’s picture

Status: Needs review » Reviewed & tested by the community

Welcome to Drupal @phpkhursheed, your patch looks perfect.

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Makes perfect sense, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.