diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index f087ac51..68d1f9e7 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -474,6 +474,11 @@ function fix_unique_member($list) { */ function sync_LDAP_groups(){ global $c; + + // Can only sync if we know where to find the groups. + if (! isset($c->authenticate_hook['config']['baseDNGroups']) ) + return; + $ldapDriver = getStaticLdap(); if ( ! $ldapDriver->valid ) return;