Fix global user bbb meeting creation see BT#14069

pull/2458/head
jmontoyaa 8 years ago
parent 8d7d1a9aa3
commit f2e14449de
  1. 11
      plugin/bbb/lib/bbb.lib.php

@ -74,11 +74,10 @@ class bbb
$this->userSupport = isset($columns['user_id']) ? true : false; $this->userSupport = isset($columns['user_id']) ? true : false;
$this->accessUrl = api_get_current_access_url_id(); $this->accessUrl = api_get_current_access_url_id();
$this->enableGlobalConferencePerUser = false;
if ($this->userSupport && !empty($isGlobalPerUser)) { if ($this->userSupport && !empty($isGlobalPerUser)) {
$this->enableGlobalConferencePerUser = $this->plugin->get('enable_global_conference_per_user') === 'true' ? true : false; $this->enableGlobalConferencePerUser = $this->plugin->get('enable_global_conference_per_user') === 'true' ? true : false;
$this->userId = $isGlobalPerUser; $this->userId = $isGlobalPerUser;
} else {
$this->enableGlobalConferencePerUser = false;
} }
if ($this->groupSupport) { if ($this->groupSupport) {
@ -111,7 +110,6 @@ class bbb
$this->userCompleteName = $userInfo['complete_name']; $this->userCompleteName = $userInfo['complete_name'];
} }
$this->salt = $bbb_salt; $this->salt = $bbb_salt;
$info = parse_url($bbb_host); $info = parse_url($bbb_host);
$this->url = $bbb_host.'/bigbluebutton/'; $this->url = $bbb_host.'/bigbluebutton/';
@ -307,11 +305,8 @@ class bbb
$params['group_id'] = api_get_group_id(); $params['group_id'] = api_get_group_id();
} }
if ($this->isGlobalConferencePerUserEnabled()) { if ($this->isGlobalConferencePerUserEnabled() && !empty($this->userId)) {
$currentUserId = api_get_user_id(); $params['user_id'] = (int) $this->userId;
if ($this->userId === $currentUserId) {
$params['user_id'] = $this->userId;
}
} }
$params['attendee_pw'] = isset($params['attendee_pw']) ? $params['attendee_pw'] : $this->getUserMeetingPassword(); $params['attendee_pw'] = isset($params['attendee_pw']) ? $params['attendee_pw'] : $this->getUserMeetingPassword();

Loading…
Cancel
Save