$city_for_update = get_term_by('slug', $city_type_value, 'city-type');
     $term_array = array();
     while ($city_for_update->parent != 0) {
         $city_for_update = get_term_by('id', $city_for_update->parent, 'city-type');
         array_push($term_array, $city_for_update->slug);
     }
     array_push($term_array, $city_type_value);
     wp_set_object_terms($pid, $term_array, 'city-type');
     if (!empty($_FILES['sightMulti']['tmp_name'][0])) {
         $i = 1;
         $files = $_FILES['sightMulti'];
         foreach ($files['name'] as $key => $value) {
             if ($files['name'][$key]) {
                 $file = array('name' => $files['name'][$key], 'type' => $files['type'][$key], 'tmp_name' => $files['tmp_name'][$key], 'error' => $files['error'][$key], 'size' => $files['size'][$key]);
                 $_FILES = array("sight" . $i => $file);
                 $newuploadMulti = sight("sight" . $i, $pid);
                 if ($i == 1) {
                     update_post_meta($pid, '_thumbnail_id', $newuploadMulti);
                 }
                 add_post_meta($pid, 'imic_property_sights', $newuploadMulti, false);
             }
             $i++;
         }
     }
 }
 if (get_query_var('site')) {
     $Property_Id = get_query_var('site');
     $property_title = get_the_title($Property_Id);
     $property_address_value = get_post_meta($Property_Id, 'imic_property_site_address', true);
     $property_pin = get_post_meta($Property_Id, 'imic_property_pincode', true);
     $property_city_value = get_post_meta($Property_Id, 'imic_property_site_city', true);
 $updateUserdata = array();
 $updateUserdata['ID'] = $user_ID;
 $updateUserdata['role'] = $_POST['change_role_member'];
 if (!empty($_POST['change_role_member']) && $_POST['change_role_member'] != __('Change Your Role', 'framework') && !current_user_can('administrator')) {
     wp_update_user($updateUserdata);
 }
 //Image
 if (!empty($_FILES)) {
     $allowedExts = array("jpeg", "jpg");
     $temp = explode(".", $_FILES["agent-image"]["name"]);
     $extension = end($temp);
     if (($_FILES["agent-image"]["type"] == "image/jpeg" || $_FILES["agent-image"]["type"] == "image/jpg") && $_FILES["agent-image"]["size"] < 256000 && in_array($extension, $allowedExts)) {
         if ($_FILES["agent-image"]["error"] > 0) {
             $message = __("Return Code: ", "framework") . $_FILES["agent-image"]["error"] . "<br>";
         } else {
             $user_image = sight('agent-image', $user_ID);
             $user_image = wp_get_attachment_image_src($user_image, 'full');
             update_user_meta($user_ID, 'agent-image', $user_image[0]);
         }
     }
 }
 $errmsg = '';
 if (is_wp_error($errors)) {
     foreach ($errors->get_error_messages() as $message) {
         $errmsg = "{$message}";
     }
 }
 if ($errmsg == '') {
     //do_action('personal_options_update', $user_ID);
     $successMsg = "<div id=\"message\"><div class=\"alert alert-success\">" . __('Profile Successfully Updated', 'framework') . "</div></div>";
 } else {