1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

controls: start pdo stuff

This commit is contained in:
Andrew Dolgov
2017-12-01 15:03:14 +03:00
parent 4ff8bdcb00
commit bbd9e5045e
2 changed files with 18 additions and 108 deletions

View File

@@ -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.");
}
}