Skip to content

Commit b919d1e

Browse files
committed
Friendlier message during LDAP group member loading if the user is in the ignore list.
Fixes #3
1 parent 9ffa7e9 commit b919d1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/LdapSyncCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,11 @@ private function getLdapUsersAndGroups(array $config, array &$users, int &$users
829829
continue;
830830
}
831831

832+
if ($this->in_array_i($ldapGroupMemberName, $config["gitlab"]["options"]["userNamesToIgnore"])) {
833+
$this->logger->info(sprintf("Group #%d / member #%d: User \"%s\" in ignore list.", $n, $o, $ldapGroupMemberName));
834+
continue;
835+
}
836+
832837
if (!isset($users[$ldapGroupMemberName]) || !is_array($users[$ldapGroupMemberName])) {
833838
$this->logger->warning(sprintf("Group #%d / member #%d: User not found \"%s\".", $n, $o, $ldapGroupMemberName));
834839
continue;

0 commit comments

Comments
 (0)