From b115b7420a678224580a4e3f099c1b8e8b96a5cb Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 29 Jan 2018 13:56:26 -0500 Subject: [PATCH] fix thigns --- api/index.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/index.php b/api/index.php index a9c2bac..ee3a9e7 100755 --- a/api/index.php +++ b/api/index.php @@ -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);