]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - api/users.php
Fix setting zlines on idents, reported by Jellis
[irc/unrealircd/unrealircd-webpanel.git] / api / users.php
index 109386200a68e1a0320ca50573c6056c36276680..c2e623411d9f75ef5408d05d0490ecd9c5691685 100644 (file)
@@ -4,14 +4,15 @@ define('NO_EVENT_STREAM_HEADER',1);
 require_once('common_api.php');
 header("Content-type: application/json; charset=utf-8");
 
+if (!$rpc)
+       die(json_encode([]));
+
 /* Get the user list */
 $users = $rpc->user()->getAll();
 
 $out = [];
 foreach($users as $user)
 {
-       // base64_encode($user->id)
-
        $isBot = (strpos($user->user->modes, "B") !== false) ? ' <span class="badge rounded-pill badge-dark">Bot</span>' : "";
        $nick = htmlspecialchars($user->name).$isBot;
 
@@ -35,7 +36,7 @@ foreach($users as $user)
        $nick = "<a href=\"details.php?nick=".$user->id."\">$nick</a>";
 
        $out[] = [
-               "Select" => "<input type=\"checkbox\" label='selectall' onClick=\"toggle_user(this)\" />", /* yeah ridiculous to have here in this file and the feed ;) */
+               "Select" => "<input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\">", /* yeah ridiculous to have here in this file and the feed ;) */
                "Nick" => $nick,
                "Country" => $country,
                "Host/IP" => $hostip,