Files
FreshRSS/cli/list-users.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

18 lines
389 B
PHP
Executable File

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