1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:25:56 +00:00

wip: initial for config object

This commit is contained in:
Andrew Dolgov
2021-02-22 21:47:48 +03:00
parent 42173386b3
commit e4107ac952
30 changed files with 165 additions and 199 deletions

View File

@@ -2,7 +2,7 @@
class UserHelper {
static function authenticate(string $login = null, string $password = null, bool $check_only = false, string $service = null) {
if (!SINGLE_USER_MODE) {
if (!Config::get(Config::SINGLE_USER_MODE)) {
$user_id = false;
$auth_module = false;
@@ -88,7 +88,7 @@ class UserHelper {
static function login_sequence() {
$pdo = Db::pdo();
if (SINGLE_USER_MODE) {
if (Config::get(Config::SINGLE_USER_MODE)) {
@session_start();
self::authenticate("admin", null);
startup_gettext();
@@ -98,7 +98,7 @@ class UserHelper {
if (empty($_SESSION["uid"])) {
if (AUTH_AUTO_LOGIN && self::authenticate(null, null)) {
if (Config::get(Config::AUTH_AUTO_LOGIN) && self::authenticate(null, null)) {
$_SESSION["ref_schema_version"] = get_schema_version(true);
} else {
self::authenticate(null, null, true);