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())
|
||||
{
|
||||
//$flag+=1;
|
||||
$insert = false;
|
||||
if ($user["fk_user_valid"] == null) $user["fk_user_valid"] = 0;
|
||||
$ncdb->query("SELECT uid FROM oc_accounts WHERE uid='" . $user["login"] . "'");
|
||||
echo "login:" . ($user["login"]) . EOL;
|
||||
@ -51,11 +52,19 @@ while ($user = $doldb->result->fetch_assoc())
|
||||
$status = $r["configvalue"] ;
|
||||
}else
|
||||
{
|
||||
$insert = true;
|
||||
$status = 1;
|
||||
}
|
||||
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'" ;
|
||||
|
||||
}
|
||||
$ncdb->query( $query );
|
||||
echo $query;
|
||||
}
|
||||
|
Reference in New Issue
Block a user