From 5f898dcc5ee244e4adbd6aa83b607c844d432fb6 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:17:22 +0200 Subject: Modernize Constants and use new constant for string 'currentUser' (#5089) * Modernize Constants and use new constant 'currentUser' * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Models/Auth.php * Update p/api/greader.php * Update p/api/greader.php * Update p/api/greader.php * Update app/Models/Context.php * Update app/Models/LogDAO.php * Update lib/Minz/Log.php * Update p/api/greader.php * Update app/layout/header.phtml * Update app/views/helpers/export/articles.phtml * Update cli/do-install.php * Remarque's from Alkarex * Remarque's from Alkarex * Refactor using new Minz_User class * Consistent naming of public constants --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/install.php') diff --git a/app/install.php b/app/install.php index a5e2ac263..b43aa81bb 100644 --- a/app/install.php +++ b/app/install.php @@ -77,7 +77,7 @@ function saveStep1() { Minz_Session::_params([ 'title' => FreshRSS_Context::$system_conf->title, 'auth_type' => FreshRSS_Context::$system_conf->auth_type, - 'default_user' => Minz_Session::param('currentUser'), + 'default_user' => Minz_User::name(), 'passwordHash' => FreshRSS_Context::$user_conf->passwordHash, 'bd_type' => FreshRSS_Context::$system_conf->db['type'], 'bd_host' => FreshRSS_Context::$system_conf->db['host'], @@ -164,9 +164,9 @@ function saveStep2() { $ok = false; try { - Minz_Session::_param('currentUser', $config_array['default_user']); + Minz_User::change($config_array['default_user']); $error = initDb(); - Minz_Session::_param('currentUser'); + Minz_User::change(); if ($error != '') { Minz_Session::_param('bd_error', $error); } else { -- cgit v1.2.3