diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 6e8c8089..eec356e2 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -476,13 +476,19 @@ function sync_LDAP_groups(){ } $ldap_groups = array_keys($ldap_groups_info); + // users only in ldap $groups_to_create = array_diff($ldap_groups,$db_groups); + // users only in db $groups_to_deactivate = array_diff($db_groups,$ldap_groups); + // users present in ldap and in the db $groups_to_update = array_intersect($db_groups,$ldap_groups); + // groups where nothing was done + $groups_nothing_done[] = null; + if ( sizeof ( $groups_to_create ) ){ $validUserFields = awl_get_fields('usr'); foreach ( $groups_to_create as $k => $group ){