blob: 6a36742b3b7233cbfbeecb422fbd0a284fce2984 [file] [log] [blame]
Andreuabbcb7e2019-09-21 18:22:14 +02001<?php
2 require '../php/utils.php';
Andreu09b8b052019-09-21 21:47:20 +02003 $user = get_users($_POST['id']);
Andreuabbcb7e2019-09-21 18:22:14 +02004
Andreu20cbd1d2019-09-22 00:00:57 +02005 $text_columns = ["nomcomplet", "md5password"];
6
Andreuabbcb7e2019-09-21 18:22:14 +02007 echo '{ ';
8 $first = true;
9 foreach ($user as $prop => $value) {
10 if (!$first) echo ', ';
11 else $first = false;
Andreu20cbd1d2019-09-22 00:00:57 +020012 if (in_array($prop, $text_columns)) echo '"'.$prop.'": "'.$value.'"';
Andreuabbcb7e2019-09-21 18:22:14 +020013 else echo '"'.$prop.'": '.$value;
14 }
15 echo ' }';
16?>