You are here

function _pmtask_get_drupal_uid_from_pmperson_nid in Drupal PM (Project Management) 7.2

Same name and namespace in other branches
  1. 8 pmtask/includes/pmtask.migrate.inc \_pmtask_get_drupal_uid_from_pmperson_nid()
  2. 7.3 pmtask/includes/pmtask.migrate.inc \_pmtask_get_drupal_uid_from_pmperson_nid()

Give back the corresponding drupal uid for a pmperson id.

1 call to _pmtask_get_drupal_uid_from_pmperson_nid()
_pmtask_migrate_migrate_single_node in pmtask/includes/pmtask.migrate.inc
Helper function to migrate single pmtask.

File

pmtask/includes/pmtask.migrate.inc, line 171
Migration functions for the PM Task module.

Code

function _pmtask_get_drupal_uid_from_pmperson_nid($nid) {
  $r = db_select('pmperson', 'p')
    ->fields('p')
    ->condition('p.nid', $nid)
    ->execute()
    ->fetchAssoc();
  $uid = empty($r) ? FALSE : $r->user_uid;
  return $uid;
}