Skip to content

Commit c999474

Browse files
committed
Reduce logging footprint
1 parent cadc42e commit c999474

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/Auth/Process/AttributeAddUsersGroups.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,21 +301,16 @@ protected function getGroups(array $attributes): array
301301
$values = $entry->getAttribute(strtolower($return_attribute));
302302
$groups[] = array_pop($values);
303303
continue;
304-
} elseif ($entry->hasAttribute('dn')) {
305-
// AD queries also seem to return the objects dn by default
306-
/** @psalm-var array $values */
307-
$values = $entry->getAttribute('dn');
308-
$groups[] = array_pop($values);
309-
continue;
310304
}
311305

312-
// Could not find DN, log and continue
306+
// Could not find return attribute, log and continue
313307
Logger::notice(sprintf(
314-
'%s : The return attribute [%s] could not be found in the entry. %s',
308+
'%s : The return attribute [%s] could not be found in entry `%s`.',
315309
$this->title,
316310
array_unique(implode(', ', [$map['return'], strtolower($map['return'])])),
317311
$entry->getDn(),
318312
));
313+
Logger::debug(sprintf('%s : Entry was: %s', $this->title, $this->varExport($entry)));
319314
}
320315

321316
// All done

0 commit comments

Comments
 (0)