From 9ad523e9c5d631a3e5dc2b17134604746a944174 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Mon, 15 May 2017 14:51:42 +0530 Subject: [PATCH] User Creation changes --- application/controllers/user.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/user.php b/application/controllers/user.php index 8ff6a651..9f4ed4c0 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -242,7 +242,7 @@ class user extends BaseController } else { - $userId = $this->session->userdata ( 'userId' ); + $userId = $this->input->post('EmpList'); $this->form_validation->set_rules('EmpList','EmpList','trim|callback_Employee_validateS'); $this->form_validation->set_rules('role','role','trim|callback_Role_validate'); $this->form_validation->set_rules('password','Password','required|max_length[20]'); @@ -254,23 +254,23 @@ class user extends BaseController } else { - //$EmpID = $this->input->post('EmpList'); + $EmpID = $this->input->post('EmpList'); $role = $this->input->post('role'); $password = $this->input->post('password'); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $updatedDate = $dt->format('Y-m-d H:i:s'); - //echo $role; - + // echo $EmpID; + $userInfo = array(); - $userInfo = array('password'=>getHashedPassword($password),'roleId'=>$role,'updatedBy'=>$this->vendorId,'updatedDtm'=>$updatedDate); + $userInfo = array('password'=>getHashedPassword($password),'roleId'=>$role,'EmpId'=>$EmpID,'updatedDtm'=>$updatedDate); - $result = $this->user_model->editUser($userInfo, $userId); + $result = $this->user_model->editUser($userInfo, $EmpID); if($result == true) {