diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index ef488943a4b..196702b938b 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -158,24 +158,24 @@ if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && empty($conf->global->LDAP_USER
print '';
// Synchro contact active
-if (!empty($conf->societe->enabled)) {
- print '
| '.$langs->trans("LDAPDnContactActive").' | ';
+if (isModEnabled('societe')) {
+ print ' |
| ' . $langs->trans("LDAPDnContactActive") . ' | ';
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
- print ' | '.$langs->trans("LDAPDnContactActiveExample").' |
';
+ print '' . $langs->trans("LDAPDnContactActiveExample") . ' | ';
}
// Synchro member active
-if (!empty($conf->adherent->enabled)) {
- print '| '.$langs->trans("LDAPDnMemberActive").' | ';
+if (isModEnabled('adherent')) {
+ print ' |
| ' . $langs->trans("LDAPDnMemberActive") . ' | ';
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2);
- print ' | '.$langs->trans("LDAPDnMemberActiveExample").' |
';
+ print '' . $langs->trans("LDAPDnMemberActiveExample") . ' | ';
}
// Synchro member type active
-if (!empty($conf->adherent->enabled)) {
- print '| '.$langs->trans("LDAPDnMemberTypeActive").' | ';
+if (isModEnabled('adherent')) {
+ print ' |
| ' . $langs->trans("LDAPDnMemberTypeActive") . ' | ';
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2);
- print ' | '.$langs->trans("LDAPDnMemberTypeActiveExample").' |
';
+ print '' . $langs->trans("LDAPDnMemberTypeActiveExample") . ' | ';
}
// Fields from hook