From 4445bcd11d71890a78ae5be501ca5bf08be2e885 Mon Sep 17 00:00:00 2001 From: int2001 Date: Thu, 16 May 2024 06:46:14 +0000 Subject: [PATCH] WIP Disable 3rd-Party on UI by cfg --- application/controllers/Lotw.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 075910ec6..63a812d44 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -206,8 +206,14 @@ class Lotw extends CI_Controller { $this->load->model('Stations'); if ($this->user_model->authorize(2)) { - $station_profiles = $this->Stations->all_of_user($this->session->userdata('user_id')); - $sync_user_id=$this->session->userdata('user_id'); + if (($this->config->item('disable_manual_lotw') ?? '') != '') { + $station_profiles = $this->Stations->all_of_user($this->session->userdata('user_id')); + $sync_user_id=$this->session->userdata('user_id'); + } else { + echo "Manual syncing is diabled by configuration"; + redirect('dashboard'); + exit(); + } } else { $station_profiles = $this->Stations->all(); $sync_user_id=null;