Files
FreshRSS/cli/update-user.php
Alexis Degrugillier 1694264e2c Modify shebang to be more portable (#3038)
The new shebang is a portable way to find the php interpreter. It works
on Mac, GNU/Linux and BSD.
2020-06-06 19:04:21 +02:00

25 lines
505 B
PHP
Executable File

#!/usr/bin/env php
<?php
$isUpdate = true;
require(__DIR__ . '/_update-or-create-user.php');
$username = cliInitUser($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'],
$values);
if (!$ok) {
fail('FreshRSS could not update user!');
}
invalidateHttpCache($username);
accessRights();
done($ok);