Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Carlo Tafuro
    Participant

    @carlotafuro

    Here’s my solution:

    add_filter( 'wpmu_validate_user_signup', 'my_wpmu_validate_user_signup' );
    
    function my_wpmu_validate_user_signup( $result ) {
    
    	$underscores_error_message = __( 'Sorry, usernames may not contain the character "_"!', 'buddypress' );
    
    	$error_messages_array = $result[ 'errors' ]->get_error_messages('user_name');
    
    	if ( count($error_messages_array) == 1 and $error_messages_array[0] == $underscores_error_message ) {
    
    		$result[ 'errors' ]->remove('user_name');
    	}
    
    	return $result;
    }
Viewing 1 replies (of 1 total)
Skip to toolbar