Custom registration ( field – value of fields – and checks )
Question
i need to :
- add a hook that updates after user username and password creation by setting them both as the variable telephone number, i try this (but not working):
// sets username and password
add_filter('pre_user_display_name','default_username');
add_filter('pre_user_display_name','default_password');
function default_username($namedisp) {
if ( isset( $_POST['username'] ) ) { $namedisp = sanitize_text_field( $_POST['billing_phone'] ); }
return $namedisp;
}
function default_password($editpswd) {
if ( isset( $_POST['password'] ) ) { $editpswd = sanitize_text_field( $_POST['billing_phone'] ); }
return $editpswd;
}
-
Also I would like a function to disable the control during user registration of empty username and password changes because I would like to fill them already here with the phone number automatically.
-
I would also like to add a “secret key” field that allows you to complete the registration process ONLY to those who fill it in with a certain content I have established.
0
custom-field, customization, input, login, registration
6 months
0 Answers
65 views
0
Leave an answer
You must login or register to add a new answer .