You are here

function crm_core_user_sync_user_insert in CRM Core 8.3

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

Implements hook_user_insert().

File

modules/crm_core_user_sync/crm_core_user_sync.module, line 17
CRM Core User Synchronization module.

Code

function crm_core_user_sync_user_insert(UserInterface $account) {
  $auto_sync_user_create = \Drupal::config('crm_core_user_sync.settings')
    ->get('auto_sync_user_create');
  if ($auto_sync_user_create) {
    \Drupal::service('crm_core_user_sync.relation')
      ->relate($account);
  }
}