diff options
| author | 2019-12-03 23:11:06 +0100 | |
|---|---|---|
| committer | 2019-12-03 23:11:06 +0100 | |
| commit | d0f1f9f141a58e090d210c221a7c1745378b96a3 (patch) | |
| tree | 5d538ee048a14d29f8091d9e85cf391ada48ae83 /cli | |
| parent | 15b8ef8f40f249ace343696df216f2d61f8249d0 (diff) | |
Separate the update API password endpoint (#2675)
* Extract hashPassword method from userController
* Extract and refactor fever key-related methods
* Move update of API password to dedicated action
* Simplify the controller by refactoring feverUtil
* Add locales
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/_update-or-create-user.php | 3 | ||||
| -rwxr-xr-x | cli/create-user.php | 1 | ||||
| -rwxr-xr-x | cli/update-user.php | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/cli/_update-or-create-user.php b/cli/_update-or-create-user.php index 43b86a4a9..3217a07ea 100644 --- a/cli/_update-or-create-user.php +++ b/cli/_update-or-create-user.php @@ -4,7 +4,6 @@ require(__DIR__ . '/_cli.php'); $params = array( 'user:', 'password:', - 'api_password:', 'language:', 'email:', 'token:', @@ -24,7 +23,7 @@ $options = getopt('', $params); if (!validateOptions($argv, $params) || empty($options['user'])) { fail('Usage: ' . basename($_SERVER['SCRIPT_FILENAME']) . - " --user username ( --password 'password' --api_password 'api_password'" . + " --user username ( --password 'password'" . " --language en --email user@example.net --token 'longRandomString'" . ($isUpdate ? '' : '--no_default_feeds') . " --purge_after_months 3 --feed_min_articles_default 50 --feed_ttl_default 3600" . diff --git a/cli/create-user.php b/cli/create-user.php index 7e0a031d9..9e978ee3c 100755 --- a/cli/create-user.php +++ b/cli/create-user.php @@ -20,7 +20,6 @@ $ok = FreshRSS_user_Controller::createUser( $username, empty($options['mail_login']) ? '' : $options['mail_login'], empty($options['password']) ? '' : $options['password'], - empty($options['api_password']) ? '' : $options['api_password'], $values, !isset($options['no_default_feeds']) ); diff --git a/cli/update-user.php b/cli/update-user.php index 8067dadd3..02da16d5a 100755 --- a/cli/update-user.php +++ b/cli/update-user.php @@ -11,7 +11,6 @@ $ok = FreshRSS_user_Controller::updateUser( $username, empty($options['mail_login']) ? null : $options['mail_login'], empty($options['password']) ? '' : $options['password'], - empty($options['api_password']) ? '' : $options['api_password'], $values); if (!$ok) { |
