From 702fc05b57aeeda0e5b484d111d94965912cc1c2 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Mon, 22 Jan 2024 02:16:04 +1300 Subject: [PATCH] Bail out early to prevent bogus errors if baseDNGroups isn't set --- inc/drivers_ldap.php | 5 +++++ 1 file changed, 5 insertions(+) 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;