From b919d1ed1641acbab85ced0e3cde57cbc4923feb Mon Sep 17 00:00:00 2001 From: Adam Reece Date: Sat, 9 Mar 2019 11:58:53 +0000 Subject: [PATCH] Friendlier message during LDAP group member loading if the user is in the ignore list. Fixes https://github.com/Adambean/gitlab-ce-ldap-sync/issues/3 --- src/LdapSyncCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LdapSyncCommand.php b/src/LdapSyncCommand.php index 75500af..211b852 100644 --- a/src/LdapSyncCommand.php +++ b/src/LdapSyncCommand.php @@ -829,6 +829,11 @@ private function getLdapUsersAndGroups(array $config, array &$users, int &$users continue; } + if ($this->in_array_i($ldapGroupMemberName, $config["gitlab"]["options"]["userNamesToIgnore"])) { + $this->logger->info(sprintf("Group #%d / member #%d: User \"%s\" in ignore list.", $n, $o, $ldapGroupMemberName)); + continue; + } + if (!isset($users[$ldapGroupMemberName]) || !is_array($users[$ldapGroupMemberName])) { $this->logger->warning(sprintf("Group #%d / member #%d: User not found \"%s\".", $n, $o, $ldapGroupMemberName)); continue;