Skip to content

Commit

Permalink
GroupController: Properly handle errors when fetching users
Browse files Browse the repository at this point in the history
refs #8826
  • Loading branch information
Johannes Meyer committed May 27, 2015
1 parent 676d209 commit adc2d33
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions application/controllers/GroupController.php
Expand Up @@ -302,8 +302,16 @@ protected function fetchUsers()
{
$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()
));
}
}

Expand Down

0 comments on commit adc2d33

Please sign in to comment.