User Confimration Working : ps
This commit is contained in:
parent
0e0d785972
commit
95e47ce2ae
@ -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);
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<h1>Dummy API Integration</h1>
|
||||
|
||||
<h3>GET - List Of Books</h3>
|
||||
<?php
|
||||
echo $books;
|
||||
?>
|
||||
|
||||
<h3>GET - Single Book</h3>
|
||||
<?php
|
||||
echo $book;
|
||||
?>
|
||||
|
||||
<h3>POST - Create New Book</h3>
|
||||
<?php
|
||||
echo $new_book;
|
||||
?>
|
||||
|
||||
<h3>PUT - Update Book</h3>
|
||||
<?php
|
||||
echo $update_book;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@ -64,7 +64,7 @@
|
||||
<td><?php echo $row['mobile_no'] ; ?></td>
|
||||
<td><?php echo $row['profile_picture'] ; ?></td>
|
||||
|
||||
<td><?php echo $row['address'].', '.$row['city'].', '.$row['state'].'- '.$row['postal_code'].'. '.$row['country'] ; ?></td>
|
||||
<td><?php echo $row['address'] ? $row['address'].', '.$row['city'].', '.$row['state'].'- '.$row['postal_code'].'. '.$row['country'] : "" ; ?></td>
|
||||
<td>
|
||||
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
||||
</td>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user