23 $this->usr_id = $a_usr_id;
33 function set($a_field,$a_value)
35 $this->user_data[$a_field] = $a_value;
37 function get($a_field)
39 return isset($this->user_data[$a_field]) ? $this->user_data[$a_field] :
'';
57 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
62 foreach($udf_obj->getDefinitions() as $definition)
70 $ilDB->replace(
"udf_clob", array(
71 "usr_id" => array(
"integer", $this->
getUserId()),
72 "field_id" => array(
"integer", $definition[
'field_id'])),
74 "value" => array(
"clob", $this->
get(
"f_".$definition[
'field_id']))
79 $ilDB->replace(
"udf_text", array(
80 "usr_id" => array(
"integer", $this->
getUserId()),
81 "field_id" => array(
"integer", $definition[
'field_id'])),
83 "value" => array(
"text", $this->
get(
"f_".$definition[
'field_id']))
116 $ilDB->manipulate(
"DELETE FROM udf_text WHERE "
117 .
" usr_id = ".$ilDB->quote($a_user_id,
"integer")
119 $ilDB->manipulate(
"DELETE FROM udf_clob WHERE "
120 .
" usr_id = ".$ilDB->quote($a_user_id,
"integer")
133 $ilDB->manipulate(
"DELETE FROM udf_text WHERE "
134 .
" field_id = ".$ilDB->quote($a_field_id,
"integer")
136 $ilDB->manipulate(
"DELETE FROM udf_clob WHERE "
137 .
" field_id = ".$ilDB->quote($a_field_id,
"integer")
151 $ilDB->manipulate(
"UPDATE udf_text SET value = ".$ilDB->quote(
"",
"text").
" WHERE "
152 .
" field_id = ".$ilDB->quote($a_field_id,
"integer")
153 .
" AND value = ".$ilDB->quote($a_value,
"text")
159 include_once
'classes/class.ilXmlWriter.php';
164 return $xml_writer->xmlDumpMem(
false);
173 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
176 foreach($udf_obj->getDefinitions() as $definition)
178 if ($definition[
"export"] != FALSE)
180 $xml_writer->xmlElement(
'UserDefinedField',
181 array(
'Id' => $definition[
'il_id'],
182 'Name' => $definition[
'field_name']),
183 (
string) $this->user_data[
'f_'.(
int) $definition[
'field_id']]);
192 $this->user_data = array();
193 $query =
"SELECT * FROM udf_text ".
194 "WHERE usr_id = ".$this->db->quote($this->usr_id,
'integer').
"";
198 $this->user_data[
"f_".$row[
"field_id"]] =
$row[
"value"];
200 $query =
"SELECT * FROM udf_clob ".
201 "WHERE usr_id = ".$this->db->quote($this->usr_id,
'integer').
"";
205 $this->user_data[
"f_".$row[
"field_id"]] =
$row[
"value"];