You are here

function zoomapi_migrate_users_batch_operation_populate_table in Zoom API 7.2

Migrate Users (populate table).

1 call to zoomapi_migrate_users_batch_operation_populate_table()
zoomapi_update_7201 in ./zoomapi.install
Migrate Zoom API users to v2.

File

./zoomapi.migrate.inc, line 51
Logic to migrate from v1 to v2.

Code

function zoomapi_migrate_users_batch_operation_populate_table($uid, $data) {
  $realm = zoomapi_realm();
  $created = REQUEST_TIME;
  $changed = REQUEST_TIME;
  $fields = [
    'uid' => $uid,
    'zoom_user_id' => $data['zoomapi_user_id'],
    'zoom_email' => $data['zoom_user_email'],
    'realm' => $realm,
    'created' => $created,
    'changed' => $changed,
  ];
  $query = db_merge('zoomapi_users')
    ->key([
    'zoom_email' => $fields['zoom_user_email'],
  ])
    ->fields($fields)
    ->execute();
}