X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fuser%2Fsrc%2FEntity%2FUser.php;fp=web%2Fcore%2Fmodules%2Fuser%2Fsrc%2FEntity%2FUser.php;h=b8675866f6f47163ce6b0a64e85a78b8f5ddd6b0;hp=54439cff9323894dc98e05655ea5043d58a5766b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/user/src/Entity/User.php b/web/core/modules/user/src/Entity/User.php index 54439cff9..b8675866f 100644 --- a/web/core/modules/user/src/Entity/User.php +++ b/web/core/modules/user/src/Entity/User.php @@ -22,6 +22,13 @@ use Drupal\user\UserInterface; * @ContentEntityType( * id = "user", * label = @Translation("User"), + * label_collection = @Translation("Users"), + * label_singular = @Translation("user"), + * label_plural = @Translation("users"), + * label_count = @PluralTranslation( + * singular = "@count user", + * plural = "@count users", + * ), * handlers = { * "storage" = "Drupal\user\UserStorage", * "storage_schema" = "Drupal\user\UserStorageSchema", @@ -348,6 +355,7 @@ class User extends ContentEntityBase implements UserInterface { public function isAuthenticated() { return $this->id() > 0; } + /** * {@inheritdoc} */ @@ -420,7 +428,7 @@ class User extends ContentEntityBase implements UserInterface { 'name' => [LanguageInterface::LANGCODE_DEFAULT => ''], // Explicitly set the langcode to ensure that field definitions do not // need to be fetched to figure out a default. - 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED] + 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED], ], $entity_type->id()); } return clone static::$anonymousUser;