Skip to content

Instantly share code, notes, and snippets.

@mindctrl
Last active January 13, 2017 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mindctrl/759e0bc97398f8ab945ca111c2b58d76 to your computer and use it in GitHub Desktop.
Save mindctrl/759e0bc97398f8ab945ca111c2b58d76 to your computer and use it in GitHub Desktop.
Restrict Content Pro - Use email address as 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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment