summaryrefslogtreecommitdiff
path: root/classes/config.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-05-11 19:36:25 +0300
committerAndrew Dolgov <[email protected]>2021-05-11 19:36:25 +0300
commitb5a559a1a7315b66768b38fe78eb49663636db8c (patch)
tree5374067fe716526a046e829acff60b33c14630bc /classes/config.php
parente3c4724dc1a44956e301897995c5edca03477a16 (diff)
sanity check: in single user mode, only test for admin user if migrations have been completed
Diffstat (limited to 'classes/config.php')
-rw-r--r--classes/config.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/config.php b/classes/config.php
index 6e8d4533f..1386b553a 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -484,7 +484,8 @@ class Config {
array_push($errors, "Data export cache is not writable (chmod -R 777 ".self::get(Config::CACHE_DIR)."/export)");
}
- if (self::get(Config::SINGLE_USER_MODE) && class_exists("PDO")) {
+ // ttrss_users won't be there on initial startup (before migrations are done)
+ if (!Config::is_migration_needed() && self::get(Config::SINGLE_USER_MODE) && class_exists("PDO")) {
if (UserHelper::get_login_by_id(1) != "admin") {
array_push($errors, "SINGLE_USER_MODE is enabled but default admin account (ID: 1) is not found.");
}