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) {