mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-02 10:27:48 -05:00
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
32 lines
681 B
PHP
Executable File
32 lines
681 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
$isUpdate = true;
|
|
require(__DIR__ . '/_update-or-create-user.php');
|
|
|
|
$username = cliInitUser($GLOBALS['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'],
|
|
$GLOBALS['values']);
|
|
|
|
if (!$ok) {
|
|
fail('FreshRSS could not update user!');
|
|
}
|
|
|
|
if (!empty($options['api_password'])) {
|
|
$error = FreshRSS_api_Controller::updatePassword($options['api_password']);
|
|
if ($error) {
|
|
fail($error);
|
|
}
|
|
}
|
|
|
|
invalidateHttpCache($username);
|
|
|
|
accessRights();
|
|
|
|
done($ok);
|