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;
103 $fields[$counter][
'autoComplete'] =
true;
107 $fields[$counter][
'lang'] = $lng->txt(
'person_title');
114 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'),
115 'f' => $lng->txt(
'gender_f'),
116 'm' => $lng->txt(
'gender_m'));
121 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'));
124 $lng->loadLanguageModule(
'meta');
125 include_once(
'./Services/Utilities/classes/class.ilCountry.php');
128 $fields[$counter][
'values'][$c] = $lng->txt(
'meta_c_'.$c);
130 asort($fields[$counter][
'values']);
148 return $fields ? $fields : array();
153 return array(
'gender',
180 if($a_key ==
'login')
185 return (
bool) $ilias->getSetting(
'search_enabled_'.$a_key);
192 $ilias->setSetting(
'search_enabled_'.$a_key,(
int) $a_enabled);
198 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
202 foreach($user_defined_fields->getSearchableDefinitions() as $definition)
205 $fields[$counter][
'lang'] = $definition[
'field_name'];
206 $fields[$counter][
'db'] = $definition[
'field_id'];
208 switch($definition[
'field_type'])
220 return $fields ? $fields : array();
227 $new_values = array(0 => $lng->txt(
'please_choose'));
228 foreach($a_values as $value)
230 $new_values[$value] = $value;
232 return $new_values ? $new_values : array();