Skip to content

Commit

Permalink
Fixed Gitlab groups not being created if they have 1 member.
Browse files Browse the repository at this point in the history
Looks like I made a silly with a Yoda formatted condition.

Fixes #5
  • Loading branch information
Adambean committed Mar 9, 2019
1 parent 6eb1398 commit 9ffa7e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LdapSyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
continue;
}

if ((!is_array($ldapGroupMembers) || 1 >= count($ldapGroupMembers)) && !$config["gitlab"]["options"]["createEmptyGroups"]) {
if ((!is_array($ldapGroupMembers) || 1 > count($ldapGroupMembers)) && !$config["gitlab"]["options"]["createEmptyGroups"]) {
$this->logger->warning(sprintf("Not creating Gitlab group \"%s\" [%s]: No members in directory group, or config gitlab->options->createEmptyGroups is disabled.", $gitlabGroupName, $gitlabGroupPath));
continue;
}
Expand Down

0 comments on commit 9ffa7e9

Please sign in to comment.