User Creation changes

This commit is contained in:
gandhimathi Bharathirajan 2017-05-15 14:51:42 +05:30
parent 758c64a12a
commit 9ad523e9c5

View File

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