Added autocomplete
diff --git a/ajax/getusers.php b/ajax/getusers.php
index e797c7b..7d9f52e 100644
--- a/ajax/getusers.php
+++ b/ajax/getusers.php
@@ -1,13 +1,14 @@
-<option selected disabled hidden>Selecciona usuari...</option>
-
<?php
require '../credentials.php';
require '../php/utils.php';
- $users = get_users(0);
-
- foreach ($users as $user) {
- $nopassword = $user->md5password == "" ? "nopassword" : "";
- $mort = $user->mort ? "disabled" : "";
- echo "<option ".$mort." class='".$nopassword."' value='".$user->id."'>".$user->nomcomplet."</option>\n";
+
+ $users = get_users(0, false);
+ foreach ($users as &$user) {
+ if ($user["mort"]) continue;
+
+ $user["nopassword"] = $user["md5password"] == "" ? "nopassword" : "";
+ unset($user["md5password"]);
}
+
+ echo json_encode($users);
?>