You are here

function _pmproject_get_drupal_uid_from_pmperson_nid in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pmproject/includes/pmproject.migrate.inc \_pmproject_get_drupal_uid_from_pmperson_nid()
  2. 7.2 pmproject/includes/pmproject.migrate.inc \_pmproject_get_drupal_uid_from_pmperson_nid()

Give back the corresponding drupal uid for a pmperson id.

1 call to _pmproject_get_drupal_uid_from_pmperson_nid()
_pmproject_migrate_migrate_single_node in pmproject/includes/pmproject.migrate.inc
Helper function to migrate single pmproject.

File

pmproject/includes/pmproject.migrate.inc, line 167
Migration functions for the PM Project module.

Code

function _pmproject_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;
}