Skip to content

Commit 707d975

Browse files
committed
Fixed creating empty groups not working.
1 parent 5a053c9 commit 707d975

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LdapSyncCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ private function deployGitlabUsersAndGroups(array $config, string $gitlabInstanc
12101210
continue;
12111211
}
12121212

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

0 commit comments

Comments
 (0)