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