aboutsummaryrefslogtreecommitdiff
path: root/cli/update-user.php
diff options
context:
space:
mode:
authorGravatar Kasimir Cash <kasimir.cash@outlook.com> 2024-01-09 22:01:17 +0000
committerGravatar GitHub <noreply@github.com> 2024-01-09 23:01:17 +0100
commit9a80dde238caf1338b803f67003cd459393efdc3 (patch)
treee382cf8f980aa0813e55f2b478a21d5c30cb19ad /cli/update-user.php
parentc89073d60e491f775a13a9ec57915313eb073964 (diff)
2297 cli parameters consistency (#6028)
* Updates do-install params * Adds parseCliParams to _cli.php * Updates do-install to use parseCliParams * Updates reconfigure to use parseCliParams * Fixes bug mail_login => email * Update create-user to use parseCliParams * Minor refactor * Updates update-user to use parseCliParams * Fix no_default_feeds => no-default-feeds * Refactors arrays * Updates CLI Readme * Adds docblocks to _cli functions * Sets vars in _cli functions * Fixes indentation * Meeting coding standards around colons * Meeting PHPStan standards * Removes stray whitespace * Meeting PHPStan Next Level standards * More specific typing * Maintaining types * Typing around getopt() * Fixes typo * Fixes typo perameters -> parameters * Removes unused variable * Rewrites deprecation warning message
Diffstat (limited to 'cli/update-user.php')
-rwxr-xr-xcli/update-user.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/update-user.php b/cli/update-user.php
index 634a716e7..9bb3ea7ff 100755
--- a/cli/update-user.php
+++ b/cli/update-user.php
@@ -5,22 +5,22 @@ declare(strict_types=1);
$isUpdate = true;
require(__DIR__ . '/_update-or-create-user.php');
-$username = cliInitUser($GLOBALS['options']['user']);
+$username = cliInitUser($GLOBALS['options']['valid']['user']);
echo 'FreshRSS updating user “', $username, "”…\n";
$ok = FreshRSS_user_Controller::updateUser(
$username,
- empty($options['mail_login']) ? null : $options['mail_login'],
- empty($options['password']) ? '' : $options['password'],
+ empty($options['valid']['email']) ? null : $options['valid']['email'],
+ empty($options['valid']['password']) ? '' : $options['valid']['password'],
$GLOBALS['values']);
if (!$ok) {
fail('FreshRSS could not update user!');
}
-if (!empty($options['api_password'])) {
- $error = FreshRSS_api_Controller::updatePassword($options['api_password']);
+if (!empty($options['valid']['api_password'])) {
+ $error = FreshRSS_api_Controller::updatePassword($options['valid']['api_password']);
if ($error) {
fail($error);
}