Add fecth extrafield into fetch user class

This commit is contained in:
fhenry 2013-05-10 12:03:27 +02:00
parent 30fb1e5e05
commit a4e8e8eb4b

View File

@ -219,6 +219,15 @@ class User extends CommonObject
$this->contact_id = $obj->fk_socpeople;
$this->fk_member = $obj->fk_member;
$this->fk_user = $obj->fk_user;
// Retreive all extrafield for thirdparty
// fetch optionals attributes and labels
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
if (count($extralabels)>0) {
$this->fetch_optionals($this->id,$extralabels);
}
$this->db->free($result);
}