Save User config API issue fixed

This commit is contained in:
venbatechnologies@gmail.com 2021-03-24 16:55:55 +05:30
parent cbd33ecb28
commit 43c5c7ea54

View File

@ -492,28 +492,29 @@ class User_Management_Controller extends REST_Controller {
}
// print_r($rcm_state_mapping);
// die();
if(!empty($rcm_state_mapping)) {
$insert_value = array();
foreach($rcm_state_mapping as $key=>$value) {
if($value) {
array_push($insert_value,(object)[
"fk_user_id" => $user_id,
"fk_state_id" => $value,
"isactive" => "1"
]);
}
}
if(!empty($insert_value)) {
$res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value);
$rcmstate_msg = "RCM States Added";
}
}
// echo "\n old data \n";
// print_r($user_config['rcm_state_mapping']);
// echo "new data";
// print_r($rcm_state_mapping);
// die();
}
if(!empty($rcm_state_mapping)) {
$insert_value = array();
foreach($rcm_state_mapping as $key=>$value) {
if($value) {
array_push($insert_value,(object)[
"fk_user_id" => $user_id,
"fk_state_id" => $value,
"isactive" => "1"
]);
}
}
if(!empty($insert_value)) {
$res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value);
$rcmstate_msg = "RCM States Added";
}
}
}
/** END OF INSERTING THE RCM STATE MAPPING DATA */