Use this snippet to create user without password
$website = "http://example.com";
$userdata = array(
'user_login' => 'login_name',
'user_url' => $website,
'user_pass' => NULL // When creating an user, password is expected.
);
$user_id = wp_insert_user( $userdata ) ;
//after this you can update user on this way
update_user_meta( $user_id, 'some_meta_key', $meta_value );
or
//create user with random password
$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
$user_id = wp_create_user( $user_name, $random_password, $user_email );
//then update/add user information on this way
update_user_meta( $user_id, 'some_meta_key', $meta_value );
Related Posts:
- Google Apps login in wordpress
- How do I create a password reset link?
- 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 check if the user registration is allowed/active?
- how to disable user confirmation from administration?
- Custom registration form page/template
- Mail isn’t sent after local site registration
- How to disable or protect against disposable email accounts?
- Changing username after registration to get around the issue of having duplicate emails?
- Registration key
- User defined password at registration – registration email sends auto generated pass
- Advice on setting up a site with front end registration
- Function like is_registration_page to check if current page is registration page
- Payment on Registration?
- WordPress members-only page with link visible only to members
- How do I show errors after validation with a custom form frontend?
- How can I find users that didn’t set a password?
- 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
- On user registration, if welcome mail sent, add post with new user as author
- 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
- Where are people registering on my website?
- How to disallow user to register with a specific word in the username?
- How to stop WordPress emailing a password
- Change User Registration
- On multisite, plugins are disabled prematurely when viewing the /wp-activate.php page file
- Adding register & login at top right corner
- Backend user creation form with additional language field
- Restrict certain character combinations in username during registration
- Register users without confirmation
- Override default new user registration email with custom message (non sub-domain multi-site installation)
- How to receive notifications when a new user registers
- Include “registration.php” for custom registration form?
- Regsitration form on External page
- can registration be enabled programatically?
- allow only lowercase user registrations
- How do I set user account inactive?
- Filter for users on custom post type
- Registration area + reserved area
- Please suggest me some plugins in WordPress networking
- Cannot login due to incorrect password right after registration?
- wordpress – user registration ( signup registration )
- Disable password limitations
- How to integrate CAPTCHA on register page? [closed]
- register_settings callback function erases data
- Custom registration fields not validating
- Register multiple users in one form
- Register through url
- Add ‘first name’, ‘last name’, ‘date of birth’ and ‘terms and conditions’ to register fields?
- How to show password fields on registration form w/o plugins
- Is there any way to not require email address or disable notification upon setting up a member?
- I want to remove the http:// that is added automaticly on the user profile adress
- I need a custom Login Registeration in WordPress can somebody guide me?
- How to enable user registration for specific country and disable registration from all other countries?
- Wikipedia – CMS
- how to change the register process
- remove (error:) from registration errors woocommerce
- Action Hook that fires function upon registration at Woocommerce checkout
- Modify new user welcome email
- Redirection after registration
- Adding email list as registered users
- Registration – website crashes, error 403
- Placeholder text for ajax loaded conditional fields in the registration form
- Creating custom registration and login page in wordpress
- How can I fetch user registration age
- Send a password to a user who has just registered for a member area
- The requested URL /wordpress/register/ was not found on this server
- Custom registration function not working as it should because is_mail and email_exist keep giving errors when it shouldn’t
- I have restricted the username to numerical format but not able to integrate the same with PeepSo plugin
- WordPress doesn’t send a password (but only a username) after new user registration
- WordPress not sending registration mail? (works on ‘lost password’)
- Macros for WordPress, creating subdomains out of registrations for current domain
- How to make user to logged into website & redirect to homepage after successful registration?
- generate an auto incremented id number when a new user is registered
- Remove wp-login link from auto generated wordpress’s email
- wordpress custom registration
- Multisite/Network What file to edit to change the “new blog” registration text
- How do spam users register while I’ve only enabled registration by Gmail via Janrain?
- How we get the success messages
- What hooks, actions or filters i can use to customize wordpress registration page and form?
- registration process with contact from 7? [closed]
- Can email address be used as user name?
- Website visible only to Registered users (non wp-admin)
- Plugin recommendation for directory site [closed]
- Verify user is Eventbrite attendee when creating new WordPress account
- Login to comment: not just user and email
- Limit username to specific characters (A-Z and 0-9)
- Group users by meta_value
- Run custom validation only if all other wordpress registration form validation was successful
- I want to set the shipping_first_name metadata value to match the first_name metadata value for a User on registration using a function