Check certs for superseded status

This commit is contained in:
phl0
2025-11-20 13:00:25 +01:00
parent a207bcee51
commit 64d80ef4e5
3 changed files with 28 additions and 11 deletions

View File

@@ -46,6 +46,15 @@ class Lotw extends CI_Controller {
// Load required models for page generation
$this->load->model('Lotw_model');
// Check for superseded certificates
$certcheck = $this->Lotw_model->lotw_certs($this->session->userdata('user_id'));
foreach ($certcheck->result() as $row) {
$status = $this->lotw_cert_status($row->serial);
if ($status != 99 && $status != $row->status) {
$this->Lotw_model->update_cert_status($row->lotw_cert_id, $status);
}
}
// Get Array of the logged in users LoTW certs.
$data['lotw_cert_results'] = $this->Lotw_model->lotw_certs($this->session->userdata('user_id'));