diff --git a/src/externalldap.js b/src/externalldap.js index 0452f9a60..2ee3733de 100644 --- a/src/externalldap.js +++ b/src/externalldap.js @@ -129,7 +129,10 @@ function ldapGroupSearch(externalLdapConfig, options, callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); - if (!externalLdapConfig.syncGroups) return callback(null, []); + if (!externalLdapConfig.syncGroups) { + debug('Group sync is disabled'); + return callback(null, []); + } getClient(externalLdapConfig, function (error, client) { if (error) return callback(error);