From 31bce137e3763fd93deb931c5a5af0c4a51b2954 Mon Sep 17 00:00:00 2001 From: RameshT Date: Mon, 5 Aug 2024 15:49:43 +0530 Subject: [PATCH] Test Husky pre-commit hook. --- application/controllers/Form.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/controllers/Form.php b/application/controllers/Form.php index d6007bf..6ca8937 100644 --- a/application/controllers/Form.php +++ b/application/controllers/Form.php @@ -13,11 +13,14 @@ class Form extends CI_Controller parent::__construct(); $this->load->model('Form_model'); } + public function submit() { if (!$this->session->userdata('logged_in')) { + // If not logged in, redirect to login page redirect('users/login'); } + $form_data = json_decode($this->input->raw_input_stream, true); $this->load->model('Form_model');