From 95e47ce2ae33ddaa73c7cbec9bf3da7a2b73beac Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 12 Oct 2023 18:36:31 +0530 Subject: [PATCH] User Confimration Working : ps --- app/Controllers/Users.php | 6 +- app/Views/api_list.php | 26 --- app/Views/user_list.php | 2 +- app/Views/welcome_message.php | 325 ---------------------------------- 4 files changed, 4 insertions(+), 355 deletions(-) delete mode 100644 app/Views/api_list.php delete mode 100644 app/Views/welcome_message.php diff --git a/app/Controllers/Users.php b/app/Controllers/Users.php index a0ae9869..de902321 100755 --- a/app/Controllers/Users.php +++ b/app/Controllers/Users.php @@ -42,6 +42,8 @@ class Users extends BaseController if ($id === '0') { $this->logger->info("Users: In Add page"); $data['page_name'] = 'Add User'; + $business_details = $this->business_details(); + $render_page_name = 'user_form'; $data['details'] = []; } else if ($id !== '0') { $this->logger->info("Users: In Edit page"); @@ -172,7 +174,6 @@ class Users extends BaseController } $data = [ - 'user_name' => $this->request->getPost('user_name'), 'profile_picture' => $final_img_name, 'city' => $this->request->getPost('city'), 'state' => $this->request->getPost('state'), @@ -211,12 +212,11 @@ class Users extends BaseController } else { // It's an update operation $isactive = $this->request->getPost('isactive'); + $data['updated_by'] = $session_uid; $data['isactive'] = ($isactive == 'on') ? 1 : 0; if($session_uid == $user_id && $data['isactive'] == 0){ throw new \Exception("Cant able to Update Because logged-In persons can't remove. Please Contact your Admin!...."); } - $data['updated_by'] = $session_uid; - // $UsersModel->update($user_id, $data); if ($UsersModel->update($user_id, $data)) { session()->setFlashdata('success', 'User has been updated successfully.'); $this->logger->info("Users: has been updated successfully. Updated ID = ".$user_id); diff --git a/app/Views/api_list.php b/app/Views/api_list.php deleted file mode 100644 index c183b4fd..00000000 --- a/app/Views/api_list.php +++ /dev/null @@ -1,26 +0,0 @@ - - - -

Dummy API Integration

- -

GET - List Of Books

- - -

GET - Single Book

- - -

POST - Create New Book

- - -

PUT - Update Book

- - - diff --git a/app/Views/user_list.php b/app/Views/user_list.php index 24143255..98091c83 100644 --- a/app/Views/user_list.php +++ b/app/Views/user_list.php @@ -64,7 +64,7 @@ - + diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php deleted file mode 100644 index 6d5da23f..00000000 --- a/app/Views/welcome_message.php +++ /dev/null @@ -1,325 +0,0 @@ - - - - - Welcome to CodeIgniter 4! - - - - - - - - - - - -
- - - -
- -

Welcome to CodeIgniter

- -

The small framework with powerful features

- -
- -
- - - -
- -

About this page

- -

The page you are looking at is being generated dynamically by CodeIgniter.

- -

If you would like to edit this page you will find it located at:

- -
app/Views/welcome_message.php
- -

The corresponding controller for this page can be found at:

- -
app/Controllers/Home.php
- -
- -
- -
- -

Go further

- -

- - Learn -

- -

The User Guide contains an introduction, tutorial, a number of "how to" - guides, and then reference documentation for the components that make up - the framework. Check the User Guide !

- -

- - Discuss -

- -

CodeIgniter is a community-developed open source project, with several - venues for the community members to gather and exchange ideas. View all - the threads on CodeIgniter's forum, or chat on Slack !

- -

- - Contribute -

- -

CodeIgniter is a community driven project and accepts contributions - of code and documentation from the community. Why not - - join us ?

- -
- -
- - - - - - - - - - - - -