Updating some meta fields on registration and providing the user the option to pick a password yet the registration email sends the auto generated password. User defined password works and not emailed pass.
add_action( 'user_register', 'jwh_register_extra_fields', 100 );
function jwh_register_extra_fields( $user_id, $password = '', $meta = array() ) {
$userdata = array();
$userdata['ID'] = $user_id;
if ( $_POST['password'] !== '' ) {
$userdata['user_pass'] = $_POST['password'];
}
$userdata['first_name'] = $_POST['first_name'];
$userdata['last_name'] = $_POST['last_name'];
$userdata['user_url'] = $_POST['user_url'];
$new_user_id = wp_update_user( $userdata );
}
Welcome to WPSE. You can use wp_insert_user, you don’t need to hook onto anything.
Assuming here they fill out a form with a name, username, email and password field, and you capture it however you want.