function __performUserSearch() { include_once 'Services/Search/classes/class.ilUserSearchOptions.php'; include_once 'Services/Search/classes/class.ilObjectSearchFactory.php'; foreach (ilUserSearchOptions::_getSearchableFieldsInfo(!$this->isSearchableCheckEnabled()) as $info) { $name = $info['db']; $query_string = $_SESSION['rep_query']['usr'][$name]; // continue if no query string is given if (!$query_string) { continue; } if (!is_object($query_parser = $this->__parseQueryString($query_string))) { ilUtil::sendInfo($query_parser); return false; } switch ($info['type']) { case FIELD_TYPE_UDF_SELECT: // Do a phrase query for select fields $query_parser = $this->__parseQueryString('"' . $query_string . '"'); case FIELD_TYPE_UDF_TEXT: $udf_search = ilObjectSearchFactory::_getUserDefinedFieldSearchInstance($query_parser); $udf_search->setFields(array($name)); $result_obj = $udf_search->performSearch(); // Store entries $this->__storeEntries($result_obj); break; case FIELD_TYPE_SELECT: // Do a phrase query for select fields $query_parser = $this->__parseQueryString('"' . $query_string . '"'); case FIELD_TYPE_TEXT: $user_search =& ilObjectSearchFactory::_getUserSearchInstance($query_parser); $user_search->setFields(array($name)); $result_obj = $user_search->performSearch(); // store entries $this->__storeEntries($result_obj); break; } } }