Skip to content

Commit 0981719

Browse files
authored
Update webservice.php generalized autocreate function
Generalize and fix the autocreate function to support create and autoCreate (depends on license type) and also choose type.
1 parent 9822eb7 commit 0981719

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

classes/webservice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,14 @@ private function make_paginated_call($url, $data, $datatoget) {
388388
* @return bool Whether the user was succesfully created.
389389
* @deprecated Has never been used by internal code.
390390
*/
391-
public function autocreate_user($user) {
391+
public function autocreate_user($user, $action = 'autoCreate', $type = ZOOM_USER_TYPE_PRO) {
392392
// Classic: user:write:admin.
393393
// Granular: user:write:user:admin.
394394
$url = 'users';
395-
$data = ['action' => 'autocreate'];
395+
$data = ['action' => $action];
396396
$data['user_info'] = [
397397
'email' => zoom_get_api_identifier($user),
398-
'type' => ZOOM_USER_TYPE_PRO,
398+
'type' => $type,
399399
'first_name' => $user->firstname,
400400
'last_name' => $user->lastname,
401401
'password' => base64_encode(random_bytes(16)),

0 commit comments

Comments
 (0)