45 $this->usr_id = $a_usr_id;
55 function set($a_field,$a_value)
57 $this->user_data[$a_field] = $a_value;
59 function get($a_field)
61 return isset($this->user_data[$a_field]) ? $this->user_data[$a_field] :
'';
66 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
71 foreach($udf_obj->getDefinitions() as $definition)
73 $sql .= (
"`".(int) $definition[
'field_id'].
"` = ".$this->db->quote($this->get($definition[
'field_id'])).
", ");
76 $query =
"REPLACE INTO usr_defined_data ".
78 "usr_id = '".$this->getUserId().
"'";
79 $this->db->query($query);
85 include_once
'classes/class.ilXmlWriter.php';
90 return $xml_writer->xmlDumpMem(
false);
99 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
102 foreach($udf_obj->getDefinitions() as $definition)
104 if ($definition[
"export"] != FALSE)
105 $xml_writer->xmlElement(
'UserDefinedField',
106 array(
'Id' => $definition[
'il_id'],
107 'Name' => $definition[
'field_name']),
108 $this->user_data[
"$definition[field_id]"]);
115 $this->user_data = array();
116 $query =
"SELECT * FROM usr_defined_data ".
117 "WHERE usr_id = ".$this->db->quote($this->usr_id).
"";
118 $res = $this->db->query($query);
121 foreach($row as $field =>
$data)
123 if($field !=
'usr_id')
125 $this->user_data[$field] =
$data;