Files
FreshRSS/cli/list-users.php
Alexandre Alapetite a18c35046d Housekeeping lib_rss.php (#8193)
* Housekeeping lib_rss.php
`lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924
Moved most functions to other places.
Mostly no change of code otherwise (see comments).

* Extension: composer run-script phpstan-third-party
2025-11-11 08:17:12 +01:00

19 lines
439 B
PHP
Executable File

#!/usr/bin/env php
<?php
declare(strict_types=1);
require __DIR__ . '/_cli.php';
$users = FreshRSS_user_Controller::listUsers();
sort($users);
if (FreshRSS_Context::systemConf()->default_user !== ''
&& in_array(FreshRSS_Context::systemConf()->default_user, $users, true)) {
array_unshift($users, FreshRSS_Context::systemConf()->default_user);
$users = array_unique($users);
}
foreach ($users as $user) {
echo $user, "\n";
}
done();