aboutsummaryrefslogtreecommitdiff
path: root/cli/update-user.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-10-01 18:31:28 +0200
committerGravatar GitHub <noreply@github.com> 2017-10-01 18:31:28 +0200
commitceda55c75b158fc1cf4813fe0f258527754b9289 (patch)
tree7c84ac32cc845ab1d70ea5a3fb263c6613de34b0 /cli/update-user.php
parentcb7ba3e47576aa1d0c3f53e5966f831e6540bbc3 (diff)
parentf241fc1841df89285ecb6f124f0d70198d712b2f (diff)
Merge pull request #1651 from FreshRSS/dev1.8.0
Release 1.8.0
Diffstat (limited to 'cli/update-user.php')
-rwxr-xr-xcli/update-user.php23
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);