X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fuser%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FEntityUser.php;fp=web%2Fcore%2Fmodules%2Fuser%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FEntityUser.php;h=b5317beb8ceb619e09b60526a09a6e58077a63f3;hp=aa74b84a437e9a0ad719929f14455f5a7cca7764;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/web/core/modules/user/src/Plugin/migrate/destination/EntityUser.php index aa74b84a4..b5317beb8 100644 --- a/web/core/modules/user/src/Plugin/migrate/destination/EntityUser.php +++ b/web/core/modules/user/src/Plugin/migrate/destination/EntityUser.php @@ -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; + } + }