Handle there being no group members in the DB

This commit is contained in:
Andrew Ruthven 2024-02-03 15:57:19 +13:00
parent 1db3663302
commit 3846d31664

View File

@ -598,7 +598,9 @@ function sync_LDAP_groups(){
if ( sizeof ( $groups_to_update ) ){
$c->messages[] = sprintf(i18n('- updating groups : %s'),join(', ',$groups_to_update));
foreach ( $groups_to_update as $group ){
$db_members = array_values ( $db_group_members[$group] );
$db_members = is_array( $db_group_members[$group] )
? array_values( $db_group_members[$group] )
: array();
$ldap_members = array_values ( $ldap_groups_info[$group][$member_field] );
$mapping_field = $c->authenticate_hook['config']['mapping_field'];