cloudlog/application/controllers/Hamsat.php
Peter Goodhall 928ef10efe Add session validation to all controllers
Inserted calls to user_model->validate_session() in all controller constructors to ensure user sessions are validated before authorization checks. This improves session handling and security across the application.
2025-11-18 22:45:01 +00:00

24 lines
725 B
PHP

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Controller to interact with the Clublog API
*/
class Hamsat extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('user_model');
$this->user_model->validate_session();
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
public function index() {
// Load public view
$data['page_title'] = "Hamsat - Satellite Roving";
$this->load->view('interface_assets/header', $data);
$this->load->view('/hamsat/index');
$this->load->view('interface_assets/footer');
}
}