function crm_core_user_sync_exists in CRM Core 7
Same name and namespace in other branches
- 8.2 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_exists()
Checks if user->contact relation exists.
File
- modules/
crm_core_user_sync/ crm_core_user_sync.module, line 232
Code
function crm_core_user_sync_exists($uid, $contact_id) {
if (is_object($uid)) {
$uid = $uid->uid;
}
if (is_object($contact_id)) {
$contact_id = $contact_id->contact_id;
}
return relation_relation_exists(array(
array(
'entity_type' => 'user',
'entity_id' => $uid,
),
array(
'entity_type' => 'crm_core_contact',
'entity_id' => $contact_id,
),
), 'crm_core_user_sync');
}