Auth: Log which groups were identified for the user being authenticated

This commit is contained in:
Johannes Meyer 2018-10-08 14:02:26 +02:00
parent d8e3f23342
commit 2f9037e545
1 changed files with 11 additions and 0 deletions

View File

@ -153,9 +153,20 @@ class Auth
continue;
}
if (empty($groupsFromBackend)) {
Logger::debug(
'No groups found in backend "%s" which the user "%s" is a member of.',
$name,
$user->getUsername()
);
continue;
}
$groupsFromBackend = array_values($groupsFromBackend);
Logger::debug(
'Groups found in backend "%s" for user "%s": %s',
$name,
$user->getUsername(),
join(', ', $groupsFromBackend)
);
$groups = array_merge($groups, array_combine($groupsFromBackend, $groupsFromBackend));
}
$user->setGroups($groups);