I have Wordpress Multisite with bbPress. I've disabled new user registration from network settings but I still seem to get new registrations regardless. I've read that bbPress is most likely the cause but I don't know how to prevent the registration. I use Wanguard and bbPress moderation plugins so I am preventing them from actually posting anything but is there a way of stopping them from getting in to begin with?
This code should make it impossible to add a new user, as long as it is being added with
add_filter( 'pre_user_login', '__return_false' );
That filter is applied to the user's login name before it is saved. If the result is empty, the user isn't added. This will make it so the login will always be empty, so it will be impossible to add new users, even from the administration panels.