Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291469

Set appropriate labels in the user entity base field definition

$
0
0

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

Problem found in #1777956-82: Provide a way to define default values for entity fields


Viewing all articles
Browse latest Browse all 291469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>