Commit 240aa61f authored by drumm's avatar drumm
Browse files

Make sure there is a contact before checking if the contact does not have a Drupal.org user ID

parent 2a16e987
......@@ -6576,9 +6576,10 @@ function drupalorg_salesforce_pull_entity_update($account, $sf_object, $sf_mappi
];
$query_results = $salesforce->query($query);
// If a salesforce contact has a drupal.org UID, don't bother pushing a UID to salesforce
// If a Salesforce contact has a Drupal.org UID, don’t bother pushing a UID
// to Salesforce.
$wrapper = entity_metadata_wrapper('user', $account);
if (empty($query_results['records'][0]['DrupalUID_int__c']) && $wrapper->field_da_ind_membership->value()) {
if (!empty($query_results) && empty($query_results['records'][0]['DrupalUID_int__c']) && $wrapper->field_da_ind_membership->value()) {
$entity_type = 'user';
$entity = $account;
$sf_sync_trigger = SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment