_userRole = $userType; $this->_userId = $userId; } public function getUsers($type=NULL) { global $CC_DBC; $sql; $sql_gen = "SELECT id, login, type FROM cc_subjs"; $sql = $sql_gen; if(!is_null($type)){ if(is_array($type)) { for($i=0; $iGetAll($sql); } public function getHosts() { return $this->getUsers(array('H', 'A')); } public function isHost($showId) { $res = CCShowHostsQuery::create()->filterByDbShow($showId)->filterByDbHost($this->_userId); } }