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
Comment #2
phpkhursheed commentedHi @jonathanshaw,
I have made the changes as per your above suggestion. Please review it once.
Comment #3
phpkhursheed commentedComment #4
jonathanshawWelcome to Drupal @phpkhursheed, your patch looks perfect.
Comment #6
kristiaanvandeneyndeMakes perfect sense, thanks!