You are here

function pmperson_migrate_field_data in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_field_data()
  2. 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_field_data()

Migrate pmperson node fields data to drupal user bundle.

1 call to pmperson_migrate_field_data()
pmperson_migrate in pmperson/includes/pmperson.migrate.inc
Helper function for migrating between PM Person nodes and Drupal users.

File

pmperson/includes/pmperson.migrate.inc, line 537
Migration functions for the PM Person module.

Code

function pmperson_migrate_field_data(&$sandbox) {
  $results = db_select('pmperson', 'pmp')
    ->fields('pmp')
    ->condition('nid', $sandbox['pmperson_current_nid_of_field_being_migrated'], '>')
    ->range(0, PMPERSON_MIGRATE_MAX_JOB_PER_BATCH)
    ->execute();
  $count = 0;
  foreach ($results as $pmperson) {
    $count++;
    $sandbox['pmperson_current_nid_of_field_being_migrated'] = $pmperson->nid;
    _pmperson_migrate_field_data($pmperson);
  }
  return empty($count);
}