function EntityUser::import

Same name in other branches
  1. 9 core/modules/user/src/Plugin/migrate/destination/EntityUser.php \Drupal\user\Plugin\migrate\destination\EntityUser::import()
  2. 8.9.x core/modules/user/src/Plugin/migrate/destination/EntityUser.php \Drupal\user\Plugin\migrate\destination\EntityUser::import()
  3. 10 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 128

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.