Skip to content

Commit

Permalink
Implemented PR feedback/suggestions.
Browse files Browse the repository at this point in the history
Implemented PR feedback/suggestions.
  • Loading branch information
paulandm committed Oct 17, 2024
1 parent 8b81aa0 commit 0344e9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions classes/webservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -1306,12 +1306,12 @@ public function get_recording_settings($meetinguuid) {
}

/**
* Returns whether or not the current user is capable of creating a meeting/webinar that requires registration.
* Returns whether or not the current user is permitted to create a meeting/webinar that requires registration.
* @return boolean
*/
public function get_user_registration_capable() {
public function is_user_permitted_to_require_registration() {
global $USER;
$zoomuser = $this->get_user($USER->email);
$zoomuser = zoom_get_user(zoom_get_api_identifier($USER));
if ($zoomuser && $zoomuser->type == ZOOM_USER_TYPE_PRO) {
return true;
}
Expand Down
5 changes: 2 additions & 3 deletions mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,8 @@ public function validation($data, $files) {
if ($data['registration'] != ZOOM_REGISTRATION_OFF) {
// Recurring meeting validation already handled by hiding registration option where required.
// Check licensing of the user.
$registrationcapableuserfound = zoom_webservice()->get_user_registration_capable();
if (!$registrationcapableuserfound) {
$errors['registration'] = get_string('err_registration', 'zoom');
if (!zoom_webservice()->is_user_permitted_to_require_registration()) {
$errors['registration'] = get_string('err_registration', 'mod_zoom');
}
}

Expand Down

0 comments on commit 0344e9a

Please sign in to comment.