Debuggage
This commit is contained in:
parent
40e76403f5
commit
f2cf94e636
@ -61,7 +61,7 @@ while ($user = $doldb->result->fetch_assoc())
|
|||||||
{
|
{
|
||||||
// différence entre nexcloud et dolibarr
|
// différence entre nexcloud et dolibarr
|
||||||
// echo "\ndifférent\n##############################\n" . $user['fk_user_valid'] . "!=" . $status . "\n";
|
// echo "\ndifférent\n##############################\n" . $user['fk_user_valid'] . "!=" . $status . "\n";
|
||||||
write_status( $insert, $user["login"], $user["fk_user_valid"] );
|
write_status( $insert, $user["login"], $user["fk_user_valid"], $ncdb );
|
||||||
}
|
}
|
||||||
// vérification si l'utilisateur est à jour de cotisation
|
// vérification si l'utilisateur est à jour de cotisation
|
||||||
if( !empty($datefin) )
|
if( !empty($datefin) )
|
||||||
@ -73,11 +73,11 @@ while ($user = $doldb->result->fetch_assoc())
|
|||||||
print_r($datefin);
|
print_r($datefin);
|
||||||
if ( $datefin->getTimestamp() <= time() )
|
if ( $datefin->getTimestamp() <= time() )
|
||||||
{
|
{
|
||||||
echo "write_status( $insert, " . $user['login'] . ", 0 )";
|
echo "write_status( $insert, " . $user['login'] . ", 0, $ncdb )";
|
||||||
}elseif ( $status == 0 )
|
}elseif ( $status == 0 )
|
||||||
{
|
{
|
||||||
// ré active l'utlisateur désactivé à jour de cotisation.
|
// ré active l'utlisateur désactivé à jour de cotisation.
|
||||||
echo "write_status( $insert, " . $user['login'] . ", 1 )";
|
echo "write_status( $insert, " . $user['login'] . ", 1, $ncdb )";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
@ -144,7 +144,7 @@ while ($user = $doldb->result->fetch_assoc())
|
|||||||
//if ($flag > 12) exit;
|
//if ($flag > 12) exit;
|
||||||
}
|
}
|
||||||
//$doldb->result->close();
|
//$doldb->result->close();
|
||||||
function write_status( $insert, $uid, $status )
|
function write_status( $insert, $uid, $status, $db )
|
||||||
{
|
{
|
||||||
if ( $insert )
|
if ( $insert )
|
||||||
{
|
{
|
||||||
@ -154,7 +154,7 @@ function write_status( $insert, $uid, $status )
|
|||||||
$query = "UPDATE oc_preferences SET configvalue = '" . ($status==1?"true":"false") ."' WHERE userid='" . $uid . "' AND appid='core' AND configkey='enabled'" ;
|
$query = "UPDATE oc_preferences SET configvalue = '" . ($status==1?"true":"false") ."' WHERE userid='" . $uid . "' AND appid='core' AND configkey='enabled'" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
$ncdb->query( $query );
|
$db->query( $query );
|
||||||
echo $query;
|
echo $query;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user