Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / user / src / Plugin / migrate / destination / EntityUser.php
index aa74b84a437e9a0ad719929f14455f5a7cca7764..b5317beb8ceb619e09b60526a09a6e58077a63f3 100644 (file)
@@ -127,4 +127,18 @@ class EntityUser extends EntityContentBase {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getHighestId() {
+    $highest_id = parent::getHighestId();
+
+    // Every Drupal site must have a user with UID of 1 and it's normal for
+    // migrations to overwrite this user.
+    if ($highest_id === 1) {
+      return 0;
+    }
+    return $highest_id;
+  }
+
 }