diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php
index a258ae7cc79..30ec8d8153c 100644
--- a/htdocs/admin/ldap_users.php
+++ b/htdocs/admin/ldap_users.php
@@ -65,6 +65,11 @@ if ($action == 'setvalue' && $user->admin)
if (! dolibarr_set_const($db, 'LDAP_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++;
+ if (! dolibarr_set_const($db, 'LDAP_FIELD_COMPANY',GETPOST("fieldcompany"),'chaine',0,'',$conf->entity)) $error++;
+ if (! dolibarr_set_const($db, 'LDAP_FIELD_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++;
+ if (! dolibarr_set_const($db, 'LDAP_FIELD_ZIP',GETPOST("fieldzip"),'chaine',0,'',$conf->entity)) $error++;
+ if (! dolibarr_set_const($db, 'LDAP_FIELD_TOWN',GETPOST("fieldtown"),'chaine',0,'',$conf->entity)) $error++;
+ if (! dolibarr_set_const($db, 'LDAP_FIELD_COUNTRY',GETPOST("fieldcountry"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION',GETPOST("fielddescription"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_SID',GETPOST("fieldsid"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_TITLE',GETPOST("fieldtitle"),'chaine',0,'',$conf->entity)) $error++;
@@ -259,6 +264,46 @@ print '
'.$langs->trans("LDAPFieldFaxExample").' | ';
print 'global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_FAX)?' checked':'')."> | ";
print '';
+// Company
+
+print '| '.$langs->trans("LDAPFieldCompany").' | ';
+print '';
+print ' | '.$langs->trans("LDAPFieldCompanyExample").' | ';
+print ' | ';
+print '
';
+
+// Address
+
+print '| '.$langs->trans("LDAPFieldAddress").' | ';
+print '';
+print ' | '.$langs->trans("LDAPFieldAddressExample").' | ';
+print ' | ';
+print '
';
+
+// ZIP
+
+print '| '.$langs->trans("LDAPFieldZip").' | ';
+print '';
+print ' | '.$langs->trans("LDAPFieldZipExample").' | ';
+print ' | ';
+print '
';
+
+// TOWN
+
+print '| '.$langs->trans("LDAPFieldTown").' | ';
+print '';
+print ' | '.$langs->trans("LDAPFieldTownExample").' | ';
+print ' | ';
+print '
';
+
+// COUNTRY
+
+print '| '.$langs->trans("LDAPFieldCountry").' | ';
+print '';
+print ' | | ';
+print ' | ';
+print '
';
+
// Title
print '| '.$langs->trans("LDAPFieldTitle").' | ';
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 28774edacf7..7973fb00290 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2310,7 +2310,7 @@ class User extends CommonObject
$soc = new Societe($this->db);
$soc->fetch($this->socid);
- $info["o"] = $soc->name;
+ $info[$conf->global->LDAP_FIELD_COMPANY] = $soc->name;
if ($soc->client == 1) $info["businessCategory"] = "Customers";
if ($soc->client == 2) $info["businessCategory"] = "Prospects";
if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers";
|