You are here

function crm_core_user_sync_user_update in CRM Core 8.2

Same name and namespace in other branches
  1. 8.3 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_user_update()
  2. 8 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_user_update()
  3. 7 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_user_update()

Implements hook_user_update()

File

modules/crm_core_user_sync/crm_core_user_sync.module, line 153

Code

function crm_core_user_sync_user_update(&$edit, $account, $category) {

  // user update only ensures that for the given user it should have a corresponding
  // contact record associated with it.
  $related_contact = _crm_core_user_sync_get_related_entity('user', $account->uid, 'crm_core_user_sync');
  if (empty($related_contact)) {
    if (variable_get('crm_core_user_sync_auto_sync_user_create', 1)) {
      crm_core_user_sync_sync($account);
    }
  }
}