update-user.php 505 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env php
  2. <?php
  3. $isUpdate = true;
  4. require(__DIR__ . '/_update-or-create-user.php');
  5. $username = cliInitUser($options['user']);
  6. echo 'FreshRSS updating user “', $username, "”…\n";
  7. $ok = FreshRSS_user_Controller::updateUser(
  8. $username,
  9. empty($options['mail_login']) ? null : $options['mail_login'],
  10. empty($options['password']) ? '' : $options['password'],
  11. $values);
  12. if (!$ok) {
  13. fail('FreshRSS could not update user!');
  14. }
  15. invalidateHttpCache($username);
  16. accessRights();
  17. done($ok);