commit | 09b8b051c863d1aa05983cf6ecfe64d35287cfe8 | [log] [tgz] |
---|---|---|
author | Andreu <andreuhuguet@gmail.com> | Sat Sep 21 21:47:20 2019 +0200 |
committer | Andreu <andreuhuguet@gmail.com> | Sat Sep 21 21:47:20 2019 +0200 |
tree | e84069299ea681ecfac8fbf452ed294a8ab80441 | |
parent | efe66ebbf51d3fcd517d9ad5ede3ad3a2282ba90 [diff] [blame] |
All POST. Introduced the 'user' cookie
diff --git a/ajax/userinfo.php b/ajax/userinfo.php new file mode 100644 index 0000000..686287d --- /dev/null +++ b/ajax/userinfo.php
@@ -0,0 +1,14 @@ +<?php + require '../php/utils.php'; + $user = get_users($_POST['id']); + + echo '{ '; + $first = true; + foreach ($user as $prop => $value) { + if (!$first) echo ', '; + else $first = false; + if ($prop == "nomcomplet") echo '"'.$prop.'": "'.$value.'"'; + else echo '"'.$prop.'": '.$value; + } + echo ' }'; +?>