From 59bf61f9b31e4fe4ae6257a6693cae3e0f5554ce Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 4 Oct 2017 09:22:18 +0200 Subject: [PATCH] NEW add possibility to disabled the LDAP trigger --- .../core/triggers/interface_50_modLdap_Ldapsynchro.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index a906ec821ed..3443c1a61b4 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -51,7 +51,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { - if (empty($conf->ldap->enabled)) return 0; // Module not active, we do nothing + if (empty($conf->ldap->enabled)) return 0; // Module not active, we do nothing + if (defined('DISABLE_LDAP_SYNCHRO')) return 0; // If constant defined, we do nothing if (! function_exists('ldap_connect')) {