function _pmperson_migrate_get_pmperson_from_uid in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmperson/includes/pmperson.migrate.inc \_pmperson_migrate_get_pmperson_from_uid()
- 7.2 pmperson/includes/pmperson.migrate.inc \_pmperson_migrate_get_pmperson_from_uid()
Load pmperson associated with a Drupal user.
2 calls to _pmperson_migrate_get_pmperson_from_uid()
- pmperson_migrate_create_users_if_required in pmperson/
includes/ pmperson.migrate.inc - Creates Drupal User and associate it with pmperson node.
- pmperson_migrate_fix_existing_users_form_submit in pmperson/
includes/ pmperson.migrate.inc - Form submit function for automatching Drupal users to PM Persons.
File
- pmperson/
includes/ pmperson.migrate.inc, line 432 - Migration functions for the PM Person module.
Code
function _pmperson_migrate_get_pmperson_from_uid($uid) {
$record = db_select('pmperson', 'pmp')
->fields('pmp')
->condition('pmp.user_uid', $uid)
->execute()
->fetchAssoc();
if ($record and $node = node_load($record['nid'])) {
return $node;
}
return FALSE;
}