You could create a custom HTML sign-up form and set up a information-catching function.
Your form could be something like this:
<form>
Username:
<input type="text" name="username">
<input type="submit" value="Submit">
</form>
Then in your functions.php of your theme use the following code to “catch the response”
function my_prefix_catch_custom_signup_form(){
if ( isset( $_POST['username'] )){
$username = sanitize_user( $_POST['username'] );
//This will create a fake email address for the user at your own domain. Something like '[email protected]'
$fake_user_email = $username . '@' . get_bloginfo( 'wpurl' );
$user_id = username_exists( $username );
if ( !$user_id and email_exists($fake_user_email) == false ) {
$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
$user_id = wp_create_user( $username, $random_password, $username . '@' . get_bloginfo( 'wpurl' ) );
} else {
$random_password = __('User already exists. Password inherited.');
}
}
}
add_action( 'init', 'my_prefix_catch_custom_signup_form');
Safety Tip: Make sure you always user proper sanitization when accepting user information through a custom form.