function _pmtimetracking_get_drupal_uid_from_pmperson_nid in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmtimetracking/includes/pmtimetracking.migrate.inc \_pmtimetracking_get_drupal_uid_from_pmperson_nid()
- 7.2 pmtimetracking/includes/pmtimetracking.migrate.inc \_pmtimetracking_get_drupal_uid_from_pmperson_nid()
Give back the corresponding drupal uid for a pmperson id.
File
- pmtimetracking/
includes/ pmtimetracking.migrate.inc, line 138 - Migration functions for the PM Timetracking module.
Code
function _pmtimetracking_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;
}