From c6413fc7551659cd8ac7efe672993c01e0e406cc Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 22 Aug 2025 17:20:26 +0100 Subject: [PATCH] Exclude archived LOTW certs from expiry checks Added 'archived' => 0 to the queries in lotw_cert_expired and lotw_cert_expiring methods to ensure only active certificates are considered when checking for expired or expiring LOTW certificates. --- application/models/LotwCert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php index f2d2c9a8..0c97fc69 100644 --- a/application/models/LotwCert.php +++ b/application/models/LotwCert.php @@ -119,7 +119,7 @@ class LotwCert extends CI_Model { } function lotw_cert_expired($user_id, $date) { - $array = array('user_id' => $user_id, 'date_expires <' => $date); + $array = array('user_id' => $user_id, 'date_expires <' => $date, 'archived' => 0); $this->db->where($array); $query = $this->db->get('lotw_certs'); @@ -131,7 +131,7 @@ class LotwCert extends CI_Model { } function lotw_cert_expiring($user_id, $date) { - $array = array('user_id' => $user_id, 'DATE_SUB(date_expires, INTERVAL 30 DAY) <' => $date, 'date_expires >' => $date); + $array = array('user_id' => $user_id, 'DATE_SUB(date_expires, INTERVAL 30 DAY) <' => $date, 'date_expires >' => $date, 'archived' => 0); $this->db->where($array); $query = $this->db->get('lotw_certs');