diff options
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); |
