From bb9b166eb1be73226d2cf978a05a70ed83faec1e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 17 Sep 2020 09:43:39 +0200 Subject: Fix CLI api_password (#3179) * Fix CLI api_password #fix https://github.com/FreshRSS/FreshRSS/issues/3177 Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2675 * Update cli/_update-or-create-user.php Co-authored-by: oupala Co-authored-by: oupala --- cli/create-user.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/create-user.php') diff --git a/cli/create-user.php b/cli/create-user.php index f98168cf6..dd0c23175 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -28,6 +28,14 @@ if (!$ok) { fail('FreshRSS could not create user!'); } +if (!empty($options['api_password'])) { + $username = cliInitUser($username); + $error = FreshRSS_api_Controller::updatePassword($options['api_password']); + if ($error) { + fail($error); + } +} + invalidateHttpCache(FreshRSS_Context::$system_conf->default_user); echo '• Remember to refresh the feeds of the user: ', $username , "\n", -- cgit v1.2.3