Skip to content

Commit

Permalink
Friendlier message during LDAP group member loading if the user is in…
Browse files Browse the repository at this point in the history
… the ignore list.

Fixes #3
  • Loading branch information
Adambean committed Mar 9, 2019
1 parent 9ffa7e9 commit b919d1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/LdapSyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b919d1e

Please sign in to comment.