You are here

function crm_core_contact_load in CRM Core 7

Load a contact.

Parameters

int $contact_id: Contact id of the contact to be loaded

array $conditions:

Return value

A contact object upon successful load FALSE if loading fails

See also

crm_core_contact_load_multiple()

11 calls to crm_core_contact_load()
CRMFeedsContactProcessor::entityLoad in modules/crm_core_contact/includes/CRMFeedsContactProcessor.inc
Loads an existing contact.
crm_core_activity_ui_views_pre_render in modules/crm_core_activity_ui/crm_core_activity_ui.module
Implements hook_views_pre_render().
crm_core_contact_search_execute in modules/crm_core_contact/crm_core_contact.module
Implements hook_search_execute().
crm_core_contact_update_7006 in modules/crm_core_contact/crm_core_contact.install
Add "name" field to "crm_core_contact" table.
crm_core_contact_update_index in modules/crm_core_contact/crm_core_contact.module
Implements hook_update_index().

... See full list

3 string references to 'crm_core_contact_load'
crm_core_contact_services_resources in modules/crm_core_contact/crm_core_contact.module
Implements hook_services_resources().
crm_core_user_sync_form_crm_core_ui_admin_config_form_alter in modules/crm_core_user_sync/crm_core_user_sync.module
Implements hook_form_FORM_ID_alter().
crm_core_user_sync_init in modules/crm_core_user_sync/crm_core_user_sync.module
Implements hook_init().

File

modules/crm_core_contact/crm_core_contact.module, line 807
Provides default CRM Core Contact entities and the ability to create more.

Code

function crm_core_contact_load($contact_id, $conditions = array()) {
  if (empty($contact_id)) {
    return array();
  }
  if ($contact_id !== FALSE) {
    $contact_id = array(
      $contact_id,
    );
  }
  $contacts = crm_core_contact_load_multiple($contact_id, $conditions);
  return $contacts ? reset($contacts) : FALSE;
}