You are here

function zoomapi_meeting_get_account_instant_meeting in Zoom API 7

Get account instant meeting information.

Parameters

object $account: The Drupal account to act as the host.

Return value

array The meeting information.

File

./zoomapi.module, line 576
Main file for the Zoom API module.

Code

function zoomapi_meeting_get_account_instant_meeting($account) {
  if (empty($account->data['zoomapi_user_id'])) {
    return [];
  }
  $sql = 'SELECT data FROM {zoomapi_meeting_tracker}';
  $sql .= ' WHERE host_zoom_user_id = :host_id';
  $sql .= ' AND meeting_type = :instant';
  $sql_args = [
    ':host_id' => $account->data['zoomapi_user_id'],
    ':instant' => ZOOMAPI_MEETING_TYPE_INSTANT,
  ];
  if ($data = db_query($sql, $sql_args)
    ->fetchField()) {
    return unserialize($data);
  }
  return [];
}