From 21744c60ee233b3dc47fb24c1145f5377badc33f Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Tue, 3 Sep 2019 02:34:21 +0200 Subject: [PATCH] DT --- nconnector.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nconnector.php b/nconnector.php index 35f132b..5697a44 100755 --- a/nconnector.php +++ b/nconnector.php @@ -53,9 +53,9 @@ while ($user = $doldb->result->fetch_assoc()) $data["phone"]["value"] = $user["phone_mobile"]; } - $data["displayname"]["value"] = concat(utf8_encode($user["firstname"]), utf8_encode($user["lastname"])); + $data["displayname"]["value"] = addslashes(concat(utf8_encode($user["firstname"]), utf8_encode($user["lastname"]))); $address = concat(utf8_encode($user['address']), $user["zip"]); - $data["address"]["value"] = concat ($address, utf8_encode($user["town"])); + $data["address"]["value"] = addslashes(concat ($address, utf8_encode($user["town"]))); $data["email"]["value"] = $user["email"]; print_r($data); if (($account_data = json_encode($data)) == false ) @@ -64,8 +64,8 @@ while ($user = $doldb->result->fetch_assoc()) exit (0); } - $oc_account_query = "INSERT INTO oc_accounts (uid, data) VALUES ('" . $user["login"] . "','" . $account_data ."')"; - $oc_users_query = "INSERT INTO oc_users (uid, displayname, password, uid_lower) VALUES ('" . $user["login"] . "','" . $user["firstname"] . ' ' . $user["lastname"] . "','1|" . $user["pass_crypted"] . "','" . strtolower($user["login"]) . "')"; + $oc_account_query = 'INSERT INTO oc_accounts (uid, data) VALUES ("' . $user["login"] . '","' . $account_data .'")'; + $oc_users_query = 'INSERT INTO oc_users (uid, displayname, password, uid_lower) VALUES ("' . $user["login"] . '","' . $user["firstname"] . ' ' . $user["lastname"] . '","1|' . $user["pass_crypted"] . '","' . strtolower($user["login"]) . '")'; if ($user["fk_adherent_type"] == 2) {