Last active
February 14, 2018 06:20
-
-
Save jerrickhakim/f9d9e19287aa6f3a9b5ab274701be0f3 to your computer and use it in GitHub Desktop.
Restrict Content Pro - Remove Required Info on Registration Form - Username=Email & Remove Password Again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* RCP REGISTER FORM STYLING */ | |
/* CSS TO REMOVE USERNAME AND PASSWORD AGAIN */ | |
p#rcp_user_login_wrap, p#rcp_password_again_wrap { | |
display: none; | |
} | |
/* END CSS TO REMOVE USERNAME AND PASSWORD AGAIN */ | |
/* END RCP REGISTER FORM STYLING */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RCP REMOVE REQUIRED INFO ON USER REGISTRATION PASSWORD AGAIN AND USERNAME=USER EMAIL | |
function jp_rcp_user_registration_data( $user ) { | |
rcp_errors()->remove( 'password_mismatch' ); | |
rcp_errors()->remove( 'username_empty' ); | |
$user['login'] = $user['email']; | |
return $user; | |
} | |
add_filter( 'rcp_user_registration_data', 'jp_rcp_user_registration_data' ); | |
// END RCP REMOVE REQUIRED INFO ON USER REGISTRATION PASSWORD AND USERNAME=USER EMAIL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment