You are here

public function EntityUser::import in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Plugin/migrate/destination/EntityUser.php \Drupal\user\Plugin\migrate\destination\EntityUser::import()

Throws

\Drupal\migrate\MigrateException

Overrides EntityContentBase::import

File

core/modules/user/src/Plugin/migrate/destination/EntityUser.php, line 126

Class

EntityUser
Provides a destination plugin for migrating user entities.

Namespace

Drupal\user\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = []) {

  // Do not overwrite the root account password.
  if ($row
    ->getDestinationProperty('uid') == 1) {
    $row
      ->removeDestinationProperty('pass');
  }
  return parent::import($row, $old_destination_id_values);
}