debuggage
This commit is contained in:
parent
3196bc492a
commit
e1aeddc0ca
@ -36,6 +36,7 @@ $doldb->query("SELECT login, firstname, lastname, pass_crypted, fk_adherent_type
|
|||||||
while ($user = $doldb->result->fetch_assoc())
|
while ($user = $doldb->result->fetch_assoc())
|
||||||
{
|
{
|
||||||
//$flag+=1;
|
//$flag+=1;
|
||||||
|
$insert = false;
|
||||||
if ($user["fk_user_valid"] == null) $user["fk_user_valid"] = 0;
|
if ($user["fk_user_valid"] == null) $user["fk_user_valid"] = 0;
|
||||||
$ncdb->query("SELECT uid FROM oc_accounts WHERE uid='" . $user["login"] . "'");
|
$ncdb->query("SELECT uid FROM oc_accounts WHERE uid='" . $user["login"] . "'");
|
||||||
echo "login:" . ($user["login"]) . EOL;
|
echo "login:" . ($user["login"]) . EOL;
|
||||||
@ -51,11 +52,19 @@ while ($user = $doldb->result->fetch_assoc())
|
|||||||
$status = $r["configvalue"] ;
|
$status = $r["configvalue"] ;
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
$insert = true;
|
||||||
$status = 1;
|
$status = 1;
|
||||||
}
|
}
|
||||||
if ( $user["fk_user_valid"] != $status )
|
if ( $user["fk_user_valid"] != $status )
|
||||||
|
{
|
||||||
|
if ( $insert )
|
||||||
|
{
|
||||||
|
$query = "INSERT INTO oc_preferences (configvalue) VALUES ( '" . $user["fk_user_valid"] . "' ) ";
|
||||||
|
}else
|
||||||
{
|
{
|
||||||
$query = "UPDATE oc_preferences SET configvalue = '" . $user["fk_user_valid"] ."' WHERE userid='" . $user["login"] . "' AND appid='core' AND configkey='enabled'" ;
|
$query = "UPDATE oc_preferences SET configvalue = '" . $user["fk_user_valid"] ."' WHERE userid='" . $user["login"] . "' AND appid='core' AND configkey='enabled'" ;
|
||||||
|
|
||||||
|
}
|
||||||
$ncdb->query( $query );
|
$ncdb->query( $query );
|
||||||
echo $query;
|
echo $query;
|
||||||
}
|
}
|
||||||
@ -75,7 +84,7 @@ while ($user = $doldb->result->fetch_assoc())
|
|||||||
$data["address"]["value"] = (concat ($address, utf8_encode($user["town"])));
|
$data["address"]["value"] = (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 )
|
||||||
{
|
{
|
||||||
echo json_last_error();
|
echo json_last_error();
|
||||||
exit (0);
|
exit (0);
|
||||||
|
Reference in New Issue
Block a user