33 define(
'FIELD_TYPE_UDF_SELECT',1);
34 define(
'FIELD_TYPE_UDF_TEXT',2);
35 define(
'FIELD_TYPE_SELECT',3);
36 define(
'FIELD_TYPE_TEXT',4);
54 foreach(self::_getSearchableFieldsInfo($a_admin) as $field)
56 if(is_numeric($field[
'db']))
58 $field[
'db'] =
'udf_'.$field[
'db'];
61 $col_info[$field[
'db']] = array(
62 'txt' => $field[
'lang']
65 if($field[
'db'] ==
'login' or $field[
'db'] ==
'firstname' or $field[
'db'] ==
'lastname')
67 $col_info[$field[
'db']][
'default'] =
true;
87 $fields[$counter][
'values'] = array();
89 $fields[$counter][
'lang'] = $lng->txt($field);
90 $fields[$counter][
'db'] = $field;
95 $fields[$counter][
'autoComplete'] =
false;
102 $fields[$counter][
'autoComplete'] =
true;
106 $fields[$counter][
'lang'] = $lng->txt(
'person_title');
113 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'),
114 'f' => $lng->txt(
'gender_f'),
115 'm' => $lng->txt(
'gender_m'));
120 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'));
123 $lng->loadLanguageModule(
'meta');
124 include_once(
'./Services/Utilities/classes/class.ilCountry.php');
127 $fields[$counter][
'values'][$c] = $lng->txt(
'meta_c_'.$c);
129 asort($fields[$counter][
'values']);
147 return $fields ? $fields : array();
152 return array(
'gender',
179 if($a_key ==
'login')
184 return (
bool) $ilias->getSetting(
'search_enabled_'.$a_key);
191 $ilias->setSetting(
'search_enabled_'.$a_key,(
int) $a_enabled);
197 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
201 foreach($user_defined_fields->getSearchableDefinitions() as $definition)
204 $fields[$counter][
'lang'] = $definition[
'field_name'];
205 $fields[$counter][
'db'] = $definition[
'field_id'];
207 switch($definition[
'field_type'])
219 return $fields ? $fields : array();
226 $new_values = array(0 => $lng->txt(
'please_choose'));
227 foreach($a_values as $value)
229 $new_values[$value] = $value;
231 return $new_values ? $new_values : array();