Fix server cert expiry queries #29

Merged
dirk merged 1 commit from fix-user-deletion-sql into main 2024-10-05 19:26:37 +00:00

View file

@ -1273,19 +1273,19 @@ function get_user_agreements($memid, $type=null, $active=null){
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `revoked`>NOW()";
}else{
and `domaincerts`.`revoked` > NOW()";
} else {
$query1 = "
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `expire`>( SUBDATE( NOW(), 90 ))
and `revoked`<`created`";
and `domaincerts`.`expire` > ( SUBDATE( NOW(), 90 ))
and `domaincerts`.`revoked` < `domaincerts`.`created`";
$query2 = "
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `revoked`>( SUBDATE( NOW(), 90 ))";
and `domaincerts`.`revoked` > ( SUBDATE( NOW(), 90 ))";
}
$res = mysql_query($query1);
$r1 = mysql_num_rows($res)>0;