diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index a90a5a723f..fc69dfa1c7 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -306,4 +306,16 @@ public function save(array $form, FormStateInterface $form_state) {
     }
   }
 
+  /**
+   * Default value callback for 'uid' base field definition.
+   *
+   * @see ::baseFieldDefinitions()
+   *
+   * @return array
+   *   An array of default values.
+   */
+  public static function getCurrentUserId() {
+    return [\Drupal::currentUser()->id()];
+  }
+
 }
