paullacey78
9/18/2017 - 12:25 PM

Remove the username requirement on the Restrict Content Pro registration form * and use the email address as the username

Remove the username requirement on the Restrict Content Pro registration form

  • and use the email address as the username
<?php
/**
 * This will remove the username requirement on the registration form
 * and use the email address as the username.
 */
function jp_rcp_user_registration_data( $user ) {
	rcp_errors()->remove( 'username_empty' );
	$user['login'] = $user['email'];
	return $user;
}

add_filter( 'rcp_user_registration_data', 'jp_rcp_user_registration_data' );
#rcp_user_login_wrap {
    display: none;
}