You are here

function services_client_services_client_skip_autosync in Services Client 7.2

Implements hook_services_client_skip_autosync().

File

./services_client.module, line 367

Code

function services_client_services_client_skip_autosync($handler, $entity, $entity_type) {

  // This would prevent syncing uid 1 account by default.
  $uids = explode(',', trim(variable_get('services_client_exclude_users', '1')));
  if ($entity_type == 'user' && in_array($entity->uid, $uids)) {
    watchdog('services_client', 'USER EXCLUDE: uid : @uid, event : @event', array(
      '@uid' => $entity->uid,
      '@event' => $handler
        ->getEvent()->name,
    ), WATCHDOG_NOTICE);
    return TRUE;
  }
}