'; echo "User with this email address (" . $_POST['email'] . ") already exists.
"; echo "Please try again.
"; echo '

'; return; } $u = get_user_by('login', strtolower(preg_replace('/ /', '', $_POST['name']))); if ($u) { echo '

'; echo "User with this login (" . strtolower(preg_replace('/ /', '', $_POST['name'])) . ") already exists.
"; echo "Please try again.
"; echo '

'; return; } $args = Array( 'user_login' => strtolower(preg_replace('/ /', '', $_POST['name'])), 'display_name' => $fname . " " . $lname, 'first_name' => $fname, 'last_name' => $lname, 'user_email' => $_POST['email'], 'user_url' => $_POST['website'], 'role' => 'contributor' ); $user_id = wp_insert_user($args); update_user_meta($user_id, 'extended_user_info_phone_number', $_POST['phone']); echo '

'; if (current_user_can('administrator')) { echo "User (" . $username . ") was added successfully.
"; } else { echo "User (" . $username . ") was added successfully.
"; } echo '

'; } ?>

Add Contributor


Enter the user's first and last name

Enter the user's complete e-mail address

Enter the URL of the user's website

Enter the user's phone number