commit 314fc7c99e85b37543c77a595fa292ce8cf0ec33 Author: Florian Weber Date: Sat Jun 16 15:03:36 2012 +0200 Issue #1616952 #10. diff --git a/core/modules/entity/entity.api.php b/core/modules/entity/entity.api.php index f253489..f670a6b 100644 --- a/core/modules/entity/entity.api.php +++ b/core/modules/entity/entity.api.php @@ -44,16 +44,15 @@ * uri can be constructed by passing these elements to url(). * - label callback: (optional) A function taking an entity and langcode as * argument and returning the label of the entity. The langcode is - * optional. If langcode is omitted, the entity's default - * language is used. The entity label is the main string associated with - * an entity; for example, the title of a node or the subject of a - * comment. If there is an entity object property that defines the label, - * use the 'label' element of the 'entity keys' return value component to - * provide this information (see below). If more complex logic is needed - * to determine the label of an entity, you can instead specify a - * callback function here, which will be called to determine the entity - * label. See also the Drupal\entity\Entity::label() method, which - * implements this logic. + * optional. If langcode is omitted, the entity's default language is used. + * The entity label is the main string associated with an entity; for + * example, the title of a node or the subject of a comment. If there is an + * entity object property that defines the label, use the 'label' element + * of the 'entity keys' return value component to provide this information + * (see below). If more complex logic is needed to determine the label of + * an entity, you can instead specify a callback function here, which will + * be called to determine the entity label. See also the + * Drupal\entity\Entity::label() method, which implements this logic. * - fieldable: Set to TRUE if you want your entity type to be fieldable. * - translation: An associative array of modules registered as field * translation handlers. Array keys are the module names, array values diff --git a/core/modules/user/user.module b/core/modules/user/user.module index efa033a..12cb7d6 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -186,6 +186,9 @@ function user_uri($user) { /** * Entity label callback. * + * This label callback has langcode for security reasons. The username is the + * visual identifier for a user and needs to be consistent in all languages. + * * @param $entity_type * The entity type. * @param $entity