blob: 181ca5632fd7c2c76deb66b509129eb4086c2a28 [file] [log] [blame]
Andreuabbcb7e2019-09-21 18:22:14 +02001<?php
Andreu2457e402019-09-22 00:52:41 +02002 require '../credentials.php';
Andreuabbcb7e2019-09-21 18:22:14 +02003 require '../php/utils.php';
Andreudd6cfb42019-09-22 19:52:39 +02004
5 $users = get_users(0, false);
Andreu4b2fbd92019-09-22 22:30:25 +02006 $users_alive = [];
7
Andreudd6cfb42019-09-22 19:52:39 +02008 foreach ($users as &$user) {
9 if ($user["mort"]) continue;
10
Andreu4b2fbd92019-09-22 22:30:25 +020011 $user["nopassword"] = ($user["md5password"] == "" ? "nopassword" : "");
Andreudd6cfb42019-09-22 19:52:39 +020012 unset($user["md5password"]);
Andreu4b2fbd92019-09-22 22:30:25 +020013 array_push($users_alive, $user);
Andreu20cbd1d2019-09-22 00:00:57 +020014 }
Andreudd6cfb42019-09-22 19:52:39 +020015
Andreu4b2fbd92019-09-22 22:30:25 +020016 echo json_encode($users_alive);
Andreuabbcb7e2019-09-21 18:22:14 +020017?>