function UserData::import

Same name in other branches
  1. 9 core/modules/user/src/Plugin/migrate/destination/UserData.php \Drupal\user\Plugin\migrate\destination\UserData::import()
  2. 10 core/modules/user/src/Plugin/migrate/destination/UserData.php \Drupal\user\Plugin\migrate\destination\UserData::import()
  3. 11.x core/modules/user/src/Plugin/migrate/destination/UserData.php \Drupal\user\Plugin\migrate\destination\UserData::import()

Overrides MigrateDestinationInterface::import

File

core/modules/user/src/Plugin/migrate/destination/UserData.php, line 59

Class

UserData
Plugin annotation @MigrateDestination( id = "user_data" )

Namespace

Drupal\user\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = []) {
    $uid = $row->getDestinationProperty('uid');
    $module = $row->getDestinationProperty('module');
    $key = $row->getDestinationProperty('key');
    $this->userData
        ->set($module, $uid, $key, $row->getDestinationProperty('settings'));
    return [
        $uid,
        $module,
        $key,
    ];
}

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