mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Honour do_not_sync_from_ldap when sync'ing group members
This had been working as a side effect of the way the SQL insert statement was working, but better to be explict about skipping them.
This commit is contained in:
1 parent
9494256f03
commit
eb4d120bbf
4 files changed
+14
-9
No files matched your search
@@ -708,6 +708,13 @@ function sync_LDAP_groups(){
|
||||
$c->messages[] = sprintf(i18n('- adding %s to group : %s'),join(', ', $add_users ), $group);
|
||||
|
||||
foreach ( $add_users as $member ) {
|
||||
if ( isset($c->do_not_sync_from_ldap)
|
||||
&& isset($c->do_not_sync_from_ldap[$member]) ) {
|
||||
dbg_error_log( "ERROR", "drivers_ldap : Skipped adding %s to %s", $member, $group);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$qry = new AwlQuery( "
|
||||
INSERT INTO group_member
|
||||
SELECT g.principal_id AS group_id, u.principal_id AS member_id
|
||||
|
||||
Reference in new issue
Block a user