Files
FreshRSS/cli/update-user.php
Marien Fressinaud d0f1f9f141 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
2019-12-03 23:11:06 +01:00

25 lines
501 B
PHP
Executable File

#!/usr/bin/php
<?php
$isUpdate = true;
require(__DIR__ . '/_update-or-create-user.php');
$username = cliInitUser($options['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'],
$values);
if (!$ok) {
fail('FreshRSS could not update user!');
}
invalidateHttpCache($username);
accessRights();
done($ok);