diff options
| author | 2017-08-19 16:26:17 +0200 | |
|---|---|---|
| committer | 2017-08-19 16:26:17 +0200 | |
| commit | f09039b1da9c49dc616277f47b3deef1ca92f127 (patch) | |
| tree | 7476dba425a794c516ded6c1a111ea68b8b55967 /cli/update-user.php | |
| parent | 19df77c249f23f00d247799ca9deaf4fd923e2bf (diff) | |
| parent | 4a813ff06fc06d1ce6c9cda2d66ff9895152be89 (diff) | |
Merge pull request #1602 from Alkarex/cli_update_user
CLI update user
Diffstat (limited to 'cli/update-user.php')
| -rwxr-xr-x | cli/update-user.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/update-user.php b/cli/update-user.php new file mode 100755 index 000000000..ac674484c --- /dev/null +++ b/cli/update-user.php @@ -0,0 +1,23 @@ +#!/usr/bin/php +<?php +$isUpdate = true; +require('_update-or-create-user.php'); + +$username = cliInitUser($options['user']); + +echo 'FreshRSS updating user “', $username, "”…\n"; + +$ok = FreshRSS_user_Controller::updateContextUser( + empty($options['password']) ? '' : $options['password'], + empty($options['api_password']) ? '' : $options['api_password'], + $values); + +if (!$ok) { + fail('FreshRSS could not update user!'); +} + +invalidateHttpCache($username); + +accessRights(); + +done($ok); |
