Problem/Motivation
Currently UserStorageController::baseFieldDefinitions()
(/core/modules/user/lib/Drupal/user/UserStorageController.php) uses the label "Name" for different base field definitions. That's not really a good idea :D
Snipped:
<?php
...
$properties['name'] = array(
'label'=> t('Name'),
'description'=> t('The name of this user'),
'type'=> 'string_field',
'settings'=> array('default_value'=> ''),
);
$properties['pass'] = array(
'label'=> t('Name'),
'description'=> t('The password of this user (hashed)'),
'type'=> 'string_field',
);
$properties['mail'] = array(
'label'=> t('Name'),
'description'=> t('The e-mail of this user'),
'type'=> 'string_field',
'settings'=> array('default_value'=> ''),
);
...
?>
Proposed resolution
Set speaking labels for all field definitions.
Remaining tasks
Create a patch. Thanks!
User interface changes
none
API changes
none
Related Issues
Problem found in #1777956-82: Provide a way to define default values for entity fields