diff options
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-x | include/sanity_check.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php index a84959f8e..713777585 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -91,9 +91,11 @@ } if (SINGLE_USER_MODE) { - $result = db_query("SELECT id FROM ttrss_users WHERE id = 1"); + $pdo = DB::pdo(); - if (db_num_rows($result) != 1) { + $res = $pdo->query("SELECT id FROM ttrss_users WHERE id = 1"); + + if (!$res->fetch()) { array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found."); } } |