1
0
This commit is contained in:
Daniel Tartavel 2019-09-03 02:34:21 +02:00
parent 29ce06e668
commit 21744c60ee

View File

@ -53,9 +53,9 @@ while ($user = $doldb->result->fetch_assoc())
$data["phone"]["value"] = $user["phone_mobile"]; $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"]); $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"]; $data["email"]["value"] = $user["email"];
print_r($data); print_r($data);
if (($account_data = json_encode($data)) == false ) if (($account_data = json_encode($data)) == false )
@ -64,8 +64,8 @@ while ($user = $doldb->result->fetch_assoc())
exit (0); exit (0);
} }
$oc_account_query = "INSERT INTO oc_accounts (uid, data) VALUES ('" . $user["login"] . "','" . $account_data ."')"; $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_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) if ($user["fk_adherent_type"] == 2)
{ {