From 50e3b2bd5e124ff556d3c915f5faa7eed603f45c Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Fri, 5 May 2023 16:50:17 +0200 Subject: [PATCH] [eQSL] Removed user check from constructor to be able to run CRON --- application/controllers/Eqsl.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 64869ea2e..e7a1a03b5 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -6,12 +6,12 @@ class eqsl extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper(array('form', 'url')); - - $this->load->model('user_model'); - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } } public function import() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + // Check if eQSL Nicknames have been defined $this->load->model('stations'); $eqsl_locations = $this->stations->all_of_user_with_eqsl_nick_defined(); @@ -90,6 +90,9 @@ class eqsl extends CI_Controller { } // end function public function export() { + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + // Check if eQSL Nicknames have been defined $this->load->model('stations'); if($this->stations->are_eqsl_nicks_defined() == 0) {