diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php index d5ec65c..0d24fa7 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php @@ -222,10 +222,6 @@ public function setPublished($published) { */ public function getAuthor() { $entity = $this->get('uid')->entity; - // If no user is given, default to the anonymous user. - if (!$entity) { - return user_load(0); - } return $entity; } @@ -264,10 +260,6 @@ public function setRevisionCreationTime($timestamp) { */ public function getRevisionAuthor() { $entity = $this->get('revision_uid')->entity; - // If no user is given, default to the anonymous user. - if (!$entity) { - return user_load(0); - } return $entity; }