GroupController: Properly handle errors when fetching users

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-27 08:55:02 +02:00
parent 676d20920b
commit adc2d33814
1 changed files with 10 additions and 2 deletions

View File

@ -302,8 +302,16 @@ class GroupController extends AuthBackendController
{
$users = array();
foreach ($this->loadUserBackends('Icinga\Data\Selectable') as $backend) {
foreach ($backend->select(array('user_name')) as $row) {
$users[] = $row;
try {
foreach ($backend->select(array('user_name')) as $row) {
$users[] = $row;
}
} catch (Exception $e) {
Logger::error($e);
Notification::warning(sprintf(
$this->translate('Failed to fetch any users from backend %s. Please check your log'),
$backend->getName()
));
}
}