mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
parent
446da85a88
commit
feab57e790
@ -31,6 +31,7 @@ namespace Icinga\Form\Config\Authentication;
|
|||||||
|
|
||||||
use \Icinga\Authentication\Backend\DbUserBackend;
|
use \Icinga\Authentication\Backend\DbUserBackend;
|
||||||
use \Icinga\Application\DbAdapterFactory;
|
use \Icinga\Application\DbAdapterFactory;
|
||||||
|
use \Zend_Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form class for adding/modifying database authentication backends
|
* Form class for adding/modifying database authentication backends
|
||||||
@ -126,10 +127,13 @@ class DbBackendForm extends BaseBackendForm
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$name = $this->getBackendName();
|
$name = $this->getBackendName();
|
||||||
$db = DbAdapterFactory::getDbAdapter(
|
$dbBackend = new DbUserBackend(new Zend_Config(
|
||||||
$this->getValue('backend_' . $this->filterName($name) . '_' . 'resource')
|
array(
|
||||||
);
|
'backend' => 'db',
|
||||||
$dbBackend = new DbUserBackend($db);
|
'target' => 'user',
|
||||||
|
'resource' => $this->getValue('backend_' . $this->filterName($name) . '_resource'),
|
||||||
|
)
|
||||||
|
));
|
||||||
if ($dbBackend->getUserCount() < 1) {
|
if ($dbBackend->getUserCount() < 1) {
|
||||||
$this->addErrorMessage("No users found under the specified database backend");
|
$this->addErrorMessage("No users found under the specified database backend");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user