From d2a4b880b170ea96ae54c13bd50a449fa0d1218b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 1 Sep 2015 23:05:34 +0200 Subject: [PATCH] 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 --- library/Icinga/Authentication/User/DbUserBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/User/DbUserBackend.php b/library/Icinga/Authentication/User/DbUserBackend.php index f9a9cb5f8..01798a8ff 100644 --- a/library/Icinga/Authentication/User/DbUserBackend.php +++ b/library/Icinga/Authentication/User/DbUserBackend.php @@ -284,7 +284,7 @@ class DbUserBackend extends DbRepository implements UserBackendInterface, Inspec $insp->write($this->ds->inspect()); try { $users = $this->select()->where('is_active', true)->count(); - if ($users >= 1) { + if ($users > 1) { $insp->write(sprintf('%s active users', $users)); } else { return $insp->error('0 active users', $users);