mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
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(); },
|
function ($b) { return $b->getName(); },
|
||||||
$this->loadUserBackends('Icinga\Data\Selectable')
|
$this->loadUserBackends('Icinga\Data\Selectable')
|
||||||
);
|
);
|
||||||
|
if (empty($backendNames)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->view->backendSelection = new Form();
|
$this->view->backendSelection = new Form();
|
||||||
$this->view->backendSelection->setAttrib('class', 'backend-selection');
|
$this->view->backendSelection->setAttrib('class', 'backend-selection');
|
||||||
$this->view->backendSelection->setUidDisabled();
|
$this->view->backendSelection->setUidDisabled();
|
||||||
|
@ -18,7 +18,7 @@ if (! $this->compact): ?>
|
|||||||
<div class="content users">
|
<div class="content users">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($backend === null) {
|
if (! isset($backend)) {
|
||||||
echo $this->translate('No backend found which is able to list users') . '</div>';
|
echo $this->translate('No backend found which is able to list users') . '</div>';
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user