Andreu | abbcb7e | 2019-09-21 18:22:14 +0200 | [diff] [blame] | 1 | <?php |
Andreu | 2457e40 | 2019-09-22 00:52:41 +0200 | [diff] [blame] | 2 | require '../credentials.php'; |
Andreu | abbcb7e | 2019-09-21 18:22:14 +0200 | [diff] [blame] | 3 | require '../php/utils.php'; |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 4 | |
5 | $users = get_users(0, false); | ||||
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 6 | $users_alive = []; |
7 | |||||
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 8 | foreach ($users as &$user) { |
9 | if ($user["mort"]) continue; | ||||
10 | |||||
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 11 | $user["nopassword"] = ($user["md5password"] == "" ? "nopassword" : ""); |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 12 | unset($user["md5password"]); |
Adrià Vilanova MartÃnez | 13cf0cd | 2022-11-20 01:02:20 +0100 | [diff] [blame^] | 13 | unset($user["quimata"]); |
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 14 | array_push($users_alive, $user); |
Andreu | 20cbd1d | 2019-09-22 00:00:57 +0200 | [diff] [blame] | 15 | } |
Andreu | dd6cfb4 | 2019-09-22 19:52:39 +0200 | [diff] [blame] | 16 | |
Andreu | 4b2fbd9 | 2019-09-22 22:30:25 +0200 | [diff] [blame] | 17 | echo json_encode($users_alive); |
Andreu | abbcb7e | 2019-09-21 18:22:14 +0200 | [diff] [blame] | 18 | ?> |