You are here

function _pmticket_get_drupal_uid_from_pmperson_nid in Drupal PM (Project Management) 8

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

Give back the corresponding drupal uid for a pmperson id.

1 call to _pmticket_get_drupal_uid_from_pmperson_nid()
_pmticket_migrate_migrate_single_node in pmticket/includes/pmticket.migrate.inc
Helper function to migrate single pmticket.

File

pmticket/includes/pmticket.migrate.inc, line 165
Migration functions for the PM Ticket module.

Code

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