faceof
Forum Replies Created
Viewing 9 replies - 1 through 9 (of 9 total)
-
if this happen with anyone here is the fix
still no one help regard this case kindly i need help
is there code for make register email auto become lowercase ?is there code for make login email auto become lowercase ?
sorry where is the code for make email auto become lowercase ?
is there code it with whitelist domain for make email auto become lowercase ?
Thanks i used username as meta and now it work fine , Thanks
function my_submit_form_errors_registration( $args ) { // Change allowed email domains here $allowed_email_domains = apply_filters( 'um_allowed_email_domains', array( 'reda.com', 'yah22oo.com', 'hot22mail.com' ) ); // Change error message here $message = __( 'You can not use this email domain for registration', 'ultimate-member' ); if ( isset( $args['username'] ) && is_email( $args['username'] ) ) { $email_domain = array_pop( explode( '@', trim( $args['username'] ) ) ); if ( !in_array( $email_domain, $allowed_email_domains ) ) { UM()->form()->add_error( 'username', $message ); } } } add_action( 'um_submit_form_errors_hook__registration', 'my_submit_form_errors_registration', 10, 1 );`
done as you say without custom validation / also try unique email.
but still didnt work any domain can register.function my_submit_form_errors_registration( $args ) { // Change allowed email domains here $allowed_email_domains = apply_filters( 'um_allowed_email_domains', array( 'reda.com', 'yah22oo.com', 'hot22mail.com' ) ); // Change error message here $message = __( 'You can not use this email domain for registration', 'ultimate-member' ); if ( isset( $args['user_email'] ) && is_email( $args['user_email'] ) ) { $email_domain = array_pop( explode( '@', trim( $args['user_email'] ) ) ); if ( !in_array( $email_domain, $allowed_email_domains ) ) { UM()->form()->add_error( 'user_email', $message ); } } } add_action( 'um_submit_form_errors_hook__registration', 'my_submit_form_errors_registration', 10, 1 );`
- This reply was modified 3 years, 7 months ago by faceof.
you mean the code will be like that ?
to add it on my themes functions.php without custom validation,do_action( 'um_submit_form_errors_hook__registration', $args ); function my_submit_form_errors_registration( $args ) { // Change allowed email domains here $allowed_email_domains = apply_filters( 'um_allowed_email_domains', array( 'reda.com', 'yah22oo.com', 'hot22mail.com' ) ); // Change error message here $message = __( 'You can not use this email domain for registration', 'ultimate-member' ); if ( isset( $args['user_email'] ) && is_email( $args['user_email'] ) ) { $email_domain = array_pop( explode( '@', trim( $args['user_email'] ) ) ); if ( !in_array( $email_domain, $allowed_email_domains ) ) { UM()->form()->add_error( 'user_email', $message ); } } } add_action( 'um_submit_form_errors_hook__registration', 'my_submit_form_errors_registration', 10, 1 );`
- This reply was modified 3 years, 7 months ago by faceof.
i try this but didnt work !!
anyone can help to fix this plz ?function um_custom_validate_email_domain( $args ) { // Change allowed email domains here $allowed_email_domains = apply_filters( 'um_allowed_email_domains', array( 'reda.com', 'yah22oo.com', 'hot22mail.com' ) ); // Change error message here $message = __( 'You can not use this email domain for registration', 'ultimate-member' ); if ( isset( $args['user_email'] ) && is_email( $args['user_email'] ) ) { $email_domain = array_pop( explode( '@', trim( $args['user_email'] ) ) ); if ( !in_array( $email_domain, $allowed_email_domains ) ) { UM()->form()->add_error( 'user_email', $message ); } } } add_action( 'um_custom_field_validation_email_domain', 'um_custom_validate_email_domain', 30, 3 );on mail section add custom action : email_domain
- This reply was modified 3 years, 7 months ago by faceof.
Viewing 9 replies - 1 through 9 (of 9 total)