public static function getAjax() { jimport('joomla.application.module.helper'); $input = JFactory::getApplication()->input; $module = JModuleHelper::getModule('hoicoi_openmeetings'); $params = new JRegistry(); $params->loadString($module->params); $values = explode(',', rtrim($params->get('rooms'), ",")); if (self::getVerification($values, $input->get("room_id"), $input->get("password", "", 'STRING'))) { $options = array("protocol" => $params->get('protocol'), "port" => $params->get('port'), "host" => $params->get('host'), "webappname" => $params->get('webappname'), "adminUser" => $params->get('adminUser'), "adminPass" => $params->get('adminPass')); $access = new openmeetings_gateway($options); if (!$access->loginuser()) { $data = array("error" => 03, "text" => self::getErrorInfo(03)); return $data; } $hash = $access->setUserObjectAndGenerateRoomHash($input->get("name"), $input->get("name", "", 'STRING'), "", "", $input->get("email", "", 'STRING'), JSession::getInstance("", "")->getId(), "Joomla", $input->get("room_id"), self::$isAdmin, self::$isRecodring); if (preg_match('/\\D/', $hash)) { $url = $access->getUrl() . "/?secureHash=" . $hash; //Get final URL $data = array("url" => $url); return $data; } else { $data = array("error" => $hash, "text" => self::getErrorInfo($hash)); return $data; } } else { $data = array("error" => 02, "text" => self::getErrorInfo(02)); return $data; } $data = array("error" => 01, "text" => self::getErrorInfo(01)); return $data; }