diff -u b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php --- b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php +++ b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php @@ -116,7 +116,6 @@ if (!$this->password) { $entity->is_hashed = TRUE; } - return parent::save($entity, $old_destination_id_values); } only in patch2: unchanged: --- a/core/modules/user/src/Tests/Migrate/d7/MigrateUserTest.php +++ b/core/modules/user/src/Tests/Migrate/d7/MigrateUserTest.php @@ -49,6 +49,8 @@ protected function setUp() { * The username. * @param string $mail * The user's email address. + * @param string $passwd + * The password for this user. * @param int $access * The last access time. * @param int $login @@ -63,8 +65,9 @@ protected function setUp() { * Role IDs the user account is expected to have. * @param bool $has_picture * Whether the user is expected to have a picture attached. + */ - protected function assertEntity($id, $label, $mail, $access, $login, $blocked, $langcode, $init, array $roles = [RoleInterface::AUTHENTICATED_ID], $has_picture = FALSE) { + protected function assertEntity($id, $label, $mail, $passwd, $access, $login, $blocked, $langcode, $init, array $roles = [RoleInterface::AUTHENTICATED_ID], $has_picture = FALSE) { /** @var \Drupal\user\UserInterface $user */ $user = User::load($id); $this->assertTrue($user instanceof UserInterface); @@ -82,13 +85,15 @@ protected function assertEntity($id, $label, $mail, $access, $login, $blocked, $ $this->assertIdentical($init, $user->getInitialEmail()); $this->assertIdentical($roles, $user->getRoles()); $this->assertIdentical($has_picture, !$user->user_picture->isEmpty()); + $this->assertIdentical($passwd, $user->getPassword()); } /** * Tests the Drupal 7 user to Drupal 8 migration. */ public function testUser() { - $this->assertEntity(2, 'Odo', 'odo@local.host', '0', '0', FALSE, '', 'odo@local.host'); + $passwd = '$S$DZ4P7zZOh92vgrgZDBbv8Pu6lQB337OJ1wsOy21602G4A5F7.M9K'; + $this->assertEntity(2, 'Odo', 'odo@local.host', $passwd, '0', '0', FALSE, '', 'odo@local.host'); } }