Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions apps/user_ldap/lib/Command/TestUserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('');

$attributeNames = [
'ldapBase',
'ldapBaseUsers',
'ldapExpertUsernameAttr',
'ldapUuidUserAttribute',
'ldapExpertUUIDUserAttr',
Expand All @@ -120,11 +122,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'ldapAttributeBiography',
'ldapAttributeBirthDate',
'ldapAttributePronouns',
'ldapGidNumber',
'hasGidNumber',
];
$output->writeln('Attributes set in configuration:');
foreach ($attributeNames as $attributeName) {
if ($connection->$attributeName !== '') {
$output->writeln("- $attributeName: <info>" . $connection->$attributeName . '</info>');
if (($connection->$attributeName !== '') && ($connection->$attributeName !== [])) {
if (\is_string($connection->$attributeName)) {
$output->writeln("- $attributeName: <info>" . $connection->$attributeName . '</info>');
} else {
$output->writeln("- $attributeName: <info>" . \json_encode($connection->$attributeName) . '</info>');
}
}
}

Expand All @@ -134,6 +142,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($connection->ldapUuidUserAttribute !== 'auto') {
$attrs[] = strtolower($connection->ldapUuidUserAttribute);
}
if ($connection->hasGidNumber) {
$attrs[] = strtolower($connection->ldapGidNumber);
}
$attrs[] = 'memberof';
$attrs = array_values(array_unique($attrs));
$attributes = $access->readAttributes($knownDn, $attrs, $filter);
Expand Down Expand Up @@ -170,6 +181,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('Group information:');

$attributeNames = [
'ldapBaseGroups',
'ldapDynamicGroupMemberURL',
'ldapGroupFilter',
'ldapGroupMemberAssocAttr',
Expand Down
Loading