Ver código fonte

Fix attendee password

jmontoyaa 8 anos atrás
pai
commit
05c3228e9f
2 arquivos alterados com 15 adições e 5 exclusões
  1. 15 3
      plugin/bbb/lib/bbb.lib.php
  2. 0 2
      plugin/bbb/start.php

+ 15 - 3
plugin/bbb/lib/bbb.lib.php

@@ -247,7 +247,7 @@ class bbb
             }
         }
 
-        $params['attendee_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : $this->getUserMeetingPassword();
+        $params['attendee_pw'] = isset($params['attendee_pw']) ? $params['attendee_pw'] : $this->getUserMeetingPassword();
         $attendeePassword = $params['attendee_pw'];
         $params['moderator_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : $this->getModMeetingPassword();
         $moderatorPassword = $params['moderator_pw'];
@@ -574,7 +574,14 @@ class bbb
     public function getMeetings($courseId = 0, $sessionId = 0, $groupId = 0, $isAdminReport = false)
     {
         $em = Database::getManager();
-        $pass = $this->getUserMeetingPassword();
+
+        $manager = $this->isConferenceManager();
+        if ($manager) {
+            $pass = $this->getUserMeetingPassword();
+        } else {
+            $pass = $this->getModMeetingPassword();
+        }
+
         $conditions = [];
 
         if ($courseId || $sessionId || $groupId) {
@@ -758,7 +765,12 @@ class bbb
             return false;
         }
         $meetingData = Database::select('*', $this->table, array('where' => array('id = ?' => array($id))), 'first');
-        $pass = $this->getUserMeetingPassword();
+        $manager = $this->isConferenceManager();
+        if ($manager) {
+            $pass = $this->getUserMeetingPassword();
+        } else {
+            $pass = $this->getModMeetingPassword();
+        }
 
         $endParams = array(
             'meetingId' => $meetingData['remote_id'],   // REQUIRED - We have to know which meeting to end.

+ 0 - 2
plugin/bbb/start.php

@@ -21,9 +21,7 @@ $bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
 
 if ($bbb->pluginEnabled) {
     if ($bbb->isServerRunning()) {
-
         if (isset($_GET['launch']) && $_GET['launch'] == 1) {
-
             if (file_exists(__DIR__ . '/config.vm.php')) {
                 $config = require __DIR__ . '/config.vm.php';
                 $vmIsEnabled = true;