mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 17:24:16 +02:00
Bring back user count in ldap backend inspection
We already use count later in the wizard anyways. refs #9630
This commit is contained in:
parent
67f46bab27
commit
5478027855
@ -387,7 +387,7 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, In
|
|||||||
if ($res === false) {
|
if ($res === false) {
|
||||||
throw new AuthenticationException('Error, no users found in backend');
|
throw new AuthenticationException('Error, no users found in backend');
|
||||||
}
|
}
|
||||||
$result->write('Users found in backend');
|
$result->write(sprintf('%d users found in backend', $this->select()->count()));
|
||||||
if (! isset($res->user_name)) {
|
if (! isset($res->user_name)) {
|
||||||
throw new AuthenticationException(
|
throw new AuthenticationException(
|
||||||
'UserNameAttribute "%s" not existing in objectClass "%s"',
|
'UserNameAttribute "%s" not existing in objectClass "%s"',
|
||||||
@ -395,9 +395,6 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, In
|
|||||||
$this->userClass
|
$this->userClass
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// (mj) don't do this until we have a more scalable count() implementation
|
|
||||||
// $result->write('User count: ' . $this->select()->count());
|
|
||||||
} catch (AuthenticationException $e) {
|
} catch (AuthenticationException $e) {
|
||||||
if (($previous = $e->getPrevious()) !== null) {
|
if (($previous = $e->getPrevious()) !== null) {
|
||||||
$result->error($previous->getMessage());
|
$result->error($previous->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user