X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_glpiPrinterAccount.inc;h=e44e000bdcb35166616d6cbd5edb83ed6ebf0c9e;hb=5968d8b031057ae89dbb12ac0b734b5e4c7f82ad;hp=abaa32acb67dccdee0244424b772778fc6dd5423;hpb=3acaa86e7054c3b16026214b5e53fe202436db1a;p=gosa.git diff --git a/plugins/admin/systems/class_glpiPrinterAccount.inc b/plugins/admin/systems/class_glpiPrinterAccount.inc index abaa32acb..e44e000bd 100644 --- a/plugins/admin/systems/class_glpiPrinterAccount.inc +++ b/plugins/admin/systems/class_glpiPrinterAccount.inc @@ -69,9 +69,9 @@ class glpiPrinterAccount extends plugin /* Contructor Sets default values and checks if we already have an existing glpi account */ - function glpiPrinterAccount ($config, $dn= NULL) + function glpiPrinterAccount ($config, $dn= NULL, $parent= NULL) { - plugin::plugin ($config, $dn); + plugin::plugin ($config, $dn, $parent); $this->ui= get_userinfo(); $this->is_account = false; @@ -376,7 +376,8 @@ class glpiPrinterAccount extends plugin if(!in_array($id,$users)){ /* If this user doesn't exists in glpi db, we must create him */ - $atr = $ldap->fetch($ldap->cat($id)); + $ldap->cat($id, array('cn', 'mail', 'telephoneNumber')); + $atr = $ldap->fetch(); $tmp = array(); $use = array( "cn" =>"name", "mail" =>"email", @@ -599,7 +600,8 @@ class glpiPrinterAccount extends plugin * Assign contact and technical responsible person */ if(isset($users[$this->contact_num])){ - $tr = $ldap->fetch($ldap->cat($users[$this->contact_num])); + $ldap->cat($users[$this->contact_num], array('givenName', 'sn', 'uid')); + $tr = $ldap->fetch(); $str = ""; if(isset($tr['givenName'][0])){ $str .= $tr['givenName'][0]." "; } if(isset($tr['sn'][0])) { $str .= $tr['sn'][0]." "; } @@ -613,7 +615,8 @@ class glpiPrinterAccount extends plugin Assign name ... to smarty, if set */ if(isset($users[$this->tech_num])){ - $tr = $ldap->fetch($ldap->cat($users[$this->tech_num])); + $ldap->cat($users[$this->tech_num], array('givenName', 'sn', 'uid')); + $tr = $ldap->fetch(); $str = ""; if(isset($tr['givenName'][0])){ $str .= $tr['givenName'][0]." "; } if(isset($tr['sn'][0])) { $str .= $tr['sn'][0]." "; } @@ -675,7 +678,8 @@ class glpiPrinterAccount extends plugin /* Check supplied data */ function check() { - $message= array(); + /* Call common method to give check the hook */ + $message= plugin::check(); // if($this->TechnicalResponsible == ""){ // $message[] = _("Please select a technical responsible person for this entry.");