You are here

function zoomapi_update_7103 in Zoom API 7

Same name and namespace in other branches
  1. 7.2 zoomapi.install \zoomapi_update_7103()

Add uuid data to meeting tracker table.

File

./zoomapi.install, line 38
Install, update, and uninstall hooks for the Zoom API module.

Code

function zoomapi_update_7103() {
  $sql = 'SELECT meeting_id, host_zoom_user_id, data FROM {zoomapi_meeting_tracker}';
  $results = db_query($sql)
    ->fetchAll();
  foreach ($results as $result) {
    $zoom_meeting = unserialize($result->data);
    if (!empty($zoom_meeting['uuid'])) {
      db_update('zoomapi_meeting_tracker')
        ->fields([
        'uuid' => $zoom_meeting['uuid'],
      ])
        ->condition('meeting_id', $result->meeting_id)
        ->condition('host_zoom_user_id', $result->host_zoom_user_id)
        ->execute();
    }
  }
}