Your address will show here +12 34 56 78

Home Forums WP ESTATE – Real Estate WordPress Theme FORUM Changing from user to agent Reply To: Changing from user to agent

#39387

Anna
Keymaster

Hi Raul

Function is in ajax-login.php line 128

function wpestate_register_as_user($user_name,$user_id){
$post = array(
‘post_title’ => $user_name,
‘post_status’ => ‘publish’,
‘post_type’ => ‘estate_agent’ ,
);

$post_id = wp_insert_post($post );
update_post_meta($post_id, ‘user_meda_id’, $user_id);
update_user_meta( $user_id, ‘user_agent_id’, $post_id) ;
}

Thank you
Anna