You are here

function zoomapi_api_create_user in Zoom API 7.2

Create Zoom user.

Simple wrapper to the API so we can track drupal/zoom user account relationship.

1 call to zoomapi_api_create_user()
zoomapi_create_user in ./zoomapi.module
Create Zoom user.

File

./zoomapi.api.inc, line 50
API callbacks for Zoom API module.

Code

function zoomapi_api_create_user($uid, $params) {
  try {
    $zoom_client = zoomapi_client();
    drupal_alter('zoomapi_create_user', $params, $uid);
    $zoom_user = $zoom_client
      ->api('user')
      ->create($params);
    zoomapi_track_user($uid, $zoom_user);
    module_invoke_all('zoomapi_user_create', $zoom_user, $uid);
    return $zoom_user;
  } catch (Exception $e) {
    watchdog(__FUNCTION__, 'Error creating zoom user for uid @id. Error: @e', [
      '@e' => $e
        ->getMessage(),
      '@id' => $uid,
    ], WATCHDOG_CRITICAL);
    return FALSE;
  }
}