Custom Fields
Re-Envisioned
Support MB User Profile Blacklist of domains for registration form

  • Creator
    Topic
  • #27014
    Resolved Roman Vader
    Participant

    Hi!

    How to add blacklist domains for registration form: @domain1.com, @domain2.com, @domain3.com
    A very useful function for MB User Profile

    Thank you

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #27022
    Long Nguyen
    Moderator

    Hi Roman Vader,

    Thank you for reaching out.

    You can use the form filters to validate any user field before creating a new user. For example, the user name abc123 will not be created/updated.

    add_filter( 'rwmb_profile_validate', function( $is_valid, $config ) {
        if( $_POST['user_login'] == 'abc123' ) {
            $is_valid = false;
        }
        return $is_valid;
    }, 99, 2 );

    Get more details on this documentation https://docs.metabox.io/extensions/mb-user-profile/#form-fitlers.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.