1
0
This commit is contained in:
Daniel Tartavel 2019-09-03 01:26:26 +02:00
parent 55a8f1e182
commit 3ba639ff01

View File

@ -57,7 +57,12 @@ while ($user = $doldb->result->fetch_assoc())
$address = concat($user['address'], $user["zip"]); $address = concat($user['address'], $user["zip"]);
$data["address"]["value"] = concat ($address, $user["town"]); $data["address"]["value"] = concat ($address, $user["town"]);
$data["email"]["value"] = $user["email"]; $data["email"]["value"] = $user["email"];
$account_data = json_encode($data); print_r($data);
if (($account_data = json_encode($data)) == false )
{
echo json_last_error();
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"]) . "')";
@ -75,7 +80,7 @@ while ($user = $doldb->result->fetch_assoc())
$oc_preferences_query_quota = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'files', 'quota', '10 GB')"; $oc_preferences_query_quota = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'files', 'quota', '10 GB')";
$oc_preferences_query_email = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'settings', 'email', '" . $user["email"] . "')"; $oc_preferences_query_email = "INSERT INTO oc_preferences(userid, appid, configkey, configvalue) VALUES ('" . $user["login"] . "', 'settings', 'email', '" . $user["email"] . "')";
echo $account_data . EOL . $oc_account_query . EOL . $oc_users_query .EOL . $oc_group_user_query . EOL . $oc_preferences_query_quota . EOL . $oc_preferences_query_email . EOL; echo $account_data . EOL . $oc_account_query . EOL . $oc_users_query .EOL . $oc_group_user_query . EOL . $oc_preferences_query_quota . EOL . $oc_preferences_query_email . EOL;
/*
if ($ncdb->query($oc_account_query)!==true) if ($ncdb->query($oc_account_query)!==true)
{ {
echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error; echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error;
@ -95,7 +100,7 @@ while ($user = $doldb->result->fetch_assoc())
if ($ncdb->query($oc_preferences_query_email)!==true) if ($ncdb->query($oc_preferences_query_email)!==true)
{ {
echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error; echo "Echec lors de la requete : (" . $ncdb->connect->errno . ") " . $ncdb->connect->error;
} }*/
} }
//$ncdb->result->close(); //$ncdb->result->close();
if ($flag > 9) exit; if ($flag > 9) exit;