From 118086dabe55efa883e1b9aaed6a8f3dcc8baa15 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 1 Sep 2019 00:57:33 +0200 Subject: [PATCH] DT --- nconnector.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nconnector.php b/nconnector.php index 1d9daea..a9b81c1 100755 --- a/nconnector.php +++ b/nconnector.php @@ -14,10 +14,9 @@ function esp( $s ) } $doldb = new db("dolibarr"); -//$doldb->database = ; $ncdb = new db("nextcloud"); -//$ncdb->database = "nextcloud"; $doldb->query("SELECT login, firstname, lastname, pass_crypted, fk_adherent_type, address, email, phone_perso, phone_mobile, zip, town FROM llx_adherent"); +print_r ($ncdb); while ($user = $doldb->result->fetch_assoc()) { $ncdb->query("SELECT uid FROM oc_accounts WHERE uid='" . $user["login"] . "'"); @@ -49,7 +48,9 @@ while ($user = $doldb->result->fetch_assoc()) } $oc_group_user_query = "INSERT INTO oc_group_user(uid, gid) VALUES ('" . $user["login"] . "','" . $gid . "')"; + echo $account_data . EOL . $oc_account_query . EOL . $oc_users_query .EOL . $oc_group_user_query . EOL; + if (!$ncdb->query($oc_account_query)) { echo "Echec lors de la requete : (" . $ncdb->errno . ") " . $ncdb->error;