fix thigns

This commit is contained in:
Ben Harris 2018-01-29 13:56:26 -05:00
parent 34ce59895d
commit b115b7420a
1 changed files with 2 additions and 3 deletions

View File

@ -27,10 +27,9 @@ elseif (isset($_GET["text"])) { // run figlet
elseif (isset($_GET["users"])) {
$users = [];
$pub = isset($_GET["pub"]) ? $_GET["pub"] != "false" : true;
foreach (scandir("/home") as $user) {
if (is_dir("/home/$user/public_html")
&& isset($_GET["pub"])
&& $_GET["pub"] != "false") continue;
if ($pub && is_dir("/home/$user/public_html")) continue;
$users[] = $user;
}
echo json_encode($users);