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.
$name_array = explode(' ',$_POST['name']);
$user = array(
'user_login' => $_POST['username'],
'user_pass' => $_POST['password'],
'user_email' => $_POST['email'],
'first_name' => $name_array[0],
'last_name' => $name_array[1],
);
$user_id = wp_insert_user( $user );
wp_new_user_notification( $user_id, $_POST['password'] );
Related Posts:
- How do I create a password reset link?
- Password field (and confirmation) showing up twice on registration
- How can I find users that didn’t set a password?
- Is there a maximum length to user passwords?
- Invalid key on activation and password reset
- Disable password limitations
- How to show password fields on registration form w/o plugins
- User activation in wordpress
- Send a password to a user who has just registered for a member area
- WordPress doesn’t send a password (but only a username) after new user registration
- WordPress not sending registration mail? (works on ‘lost password’)
- Group users by meta_value
- Include New Meta Field In New User Registration Email
- Is it possible to remove username field from the registration page? If so, how?
- Adding fields to the “Add New User” screen in the dashboard
- users table – user_name vs. nicename
- Disable user registration password email
- Google Apps login in wordpress
- Can I hook into user registration *before* a user is created?
- How can I be certain that a user has verified their email after registration?
- Placeholder text for registration form
- Use the user_activation_key for other purposes
- How to limit user registration to a specific set of domains?
- Stop spam users from registering without disabling user registration?
- How do I create a user using the new JSON api in 4.7?
- How to let user set password on registration
- How to check if the user registration is allowed/active?
- How to display custom user meta from registration in backend?
- how to disable user confirmation from administration?
- Save custom user meta on registration
- Why do generated passwords start/end with spaces?
- How to prevent spam users registering even with registration disabled
- Custom registration form page/template
- Insert “New User” and update/set meta data at once
- Send automatic email to user after wp_create_user
- How to loop through each user id?
- Mail isn’t sent after local site registration
- How to prevent certain usernames from being registered?
- Post-Registration, post-meta hook?
- How to disable or protect against disposable email accounts?
- How to customise wp-login.php only for users who are setting a password for the first time?
- How to get user-meta from Social Login registered users?
- Changing username after registration to get around the issue of having duplicate emails?
- Show User Their Password
- How to use the WP REST API for new user registration (sign up form)?
- generate unique number when registering a user
- Registration key
- Creating a custom post type upon registration
- very last action before during user registration before he is redirected to homepage
- ACF Upload Image in front-end with custom form
- Advice on setting up a site with front end registration
- How to add a description to the user name input field in the registration form?
- Creating a Closed WordPress Community Using Referral Codes
- How to hook into user registration process Before user registers
- How to add a checkbox to registration and user profile?
- How to redirect action=register link on the lostpassword page to a different link?
- Function like is_registration_page to check if current page is registration page
- wp_create_user hook
- Payment on Registration?
- White spaces in username give 404 on author page
- WordPress members-only page with link visible only to members
- Upload files programmatically to users
- How to increase password requirements for registration [closed]
- Can user_register output the password?
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- auto assign sequence base username while registration
- Problem with logging in WP users automatically
- How to disable user registration for the default subscriber user role?
- How To Get User Data in Callback Function for pre_user_nicename?
- How do I show errors after validation with a custom form frontend?
- Get plain password on register
- How to allow more than one registered user to have the same email?
- Displaying a Welcome Message to a Woocommerce User
- Send custom signup approval email to different Administrators selectively
- Registering without e-mail adress!
- Batch users creation
- After e-junkie payment, send a http post to register user automatically?
- Checked checkbox?
- Set user password after creating user
- Email confirmation in user registration form without a plugin
- How to add additional information to a user on user creation?
- On user registration, if welcome mail sent, add post with new user as author
- Store user’s registration date as meta
- Average Account Age
- Can I prevent “wp_user_level” from getting added to wp_usermeta on registration?
- How to allow wordpress to create username with symbols like +
- How to bypass the username as a required field in registration and just use email address instead?
- Does the user_register change in multisite?
- Registration options and approvals
- user activation email doesn’t work
- Which hook should I use to capture $_POST(‘password’) via profile update and password reset
- Where are people registering on my website?
- How to disallow user to register with a specific word in the username?
- How to add custom fields to the all users page
- How can I have user registration verify a whether a new user is listed in a table of pre-approved users?
- How to stop WordPress emailing a password
- Mobile User Registration
- Change User Registration
- add custom field in user register form
- Conditionally registering users