From a4e8e8eb4bcf30a1966b2a44e8e386781fa7be6e Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 10 May 2013 12:03:27 +0200 Subject: [PATCH] Add fecth extrafield into fetch user class --- htdocs/user/class/user.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 0d50e08e0fd..32dafcef617 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -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); }