mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Revert "Accept DbUserBackends with only one single user"
This reverts commit c8d065b3e0197b8c96dba436a5c04cebca704568. There's a PR on GitHub open that was contributed earlier than this fix. Thus giving credit to the PR's author. refs #9739
This commit is contained in:
parent
41ab03accb
commit
d2a4b880b1
@ -284,7 +284,7 @@ class DbUserBackend extends DbRepository implements UserBackendInterface, Inspec
|
|||||||
$insp->write($this->ds->inspect());
|
$insp->write($this->ds->inspect());
|
||||||
try {
|
try {
|
||||||
$users = $this->select()->where('is_active', true)->count();
|
$users = $this->select()->where('is_active', true)->count();
|
||||||
if ($users >= 1) {
|
if ($users > 1) {
|
||||||
$insp->write(sprintf('%s active users', $users));
|
$insp->write(sprintf('%s active users', $users));
|
||||||
} else {
|
} else {
|
||||||
return $insp->error('0 active users', $users);
|
return $insp->error('0 active users', $users);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user