is_email_address_unsafe example



    /** This filter is documented in wp-includes/user.php */
    $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );

    if ( in_array( strtolower( $user_name )array_map( 'strtolower', $illegal_logins ), true ) ) {
        $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
    }

    if ( ! is_email( $user_email ) ) {
        $errors->add( 'user_email', __( 'Please enter a valid email address.' ) );
    } elseif ( is_email_address_unsafe( $user_email ) ) {
        $errors->add( 'user_email', __( 'You cannot use that email address to signup. There are problems with them blocking some emails from WordPress. Please use another email provider.' ) );
    }

    if ( strlen( $user_name ) < 4 ) {
        $errors->add( 'user_name', __( 'Username must be at least 4 characters.' ) );
    }

    if ( strlen( $user_name ) > 60 ) {
        $errors->add( 'user_name', __( 'Username may not be longer than 60 characters.' ) );
    }

    
Home | Imprint | This part of the site doesn't use cookies.