function zoomapi_user_update_info in Zoom API 7
Update User Info.
Parameters
object $account: The Drupal user account to generate the Zoom account for.
array $options: Optional array of Zoom user configuration options.
Return value
array An array of the Zoom user account information.
File
- ./
zoomapi.module, line 314 - Main file for the Zoom API module.
Code
function zoomapi_user_update_info($account, array $options) {
// In some cases an outdated account is passed without the zoom_user_id. If it
// doesn't exist then try reloading the account.
if (empty($account->data['zoomapi_user_id'])) {
$account = user_load($account->uid);
}
if (empty($account->data['zoomapi_user_id'])) {
watchdog(__FUNCTION__, 'Unable to update account (uid: !uid) due to missing zoom_user_id', [
'!uid' => $account->uid,
], WATCHDOG_ERROR);
return [];
}
$zoomapi_user = new ZoomAPIUser();
$zoom_user = $zoomapi_user
->update($account->data['zoomapi_user_id'], $options);
return $zoom_user;
}