UserController: Behave nicely when not any backend is available
This commit is contained in:
parent
3600e1088c
commit
07041fafc8
|
@ -28,6 +28,10 @@ class UserController extends AuthBackendController
|
|||
function ($b) { return $b->getName(); },
|
||||
$this->loadUserBackends('Icinga\Data\Selectable')
|
||||
);
|
||||
if (empty($backendNames)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->view->backendSelection = new Form();
|
||||
$this->view->backendSelection->setAttrib('class', 'backend-selection');
|
||||
$this->view->backendSelection->setUidDisabled();
|
||||
|
|
|
@ -18,7 +18,7 @@ if (! $this->compact): ?>
|
|||
<div class="content users">
|
||||
<?php
|
||||
|
||||
if ($backend === null) {
|
||||
if (! isset($backend)) {
|
||||
echo $this->translate('No backend found which is able to list users') . '</div>';
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue