required Username twice at Registration

At my registration page I have two required username fields. One for WordPress itself and one for buddypress I think. How can I set to just fill out the one for wordpress and set the same username for buddypress as well? It’s really confusing for the user to set the username twice.

thanks… thats not really compareable, the double password entering is just for precaution.
I’ve never seen anywhere to enter my username twice.. And what if they enter two different ones, they don’t know for sure with which one they could login. That’s just odd for everyone who don’t know it’s about WordPress and Buddypress.

Your link couldn’t help me, the topics are about not using usernames at general, I need it, but not twice. I dont’t trust the Plugin Simplr Registration Form Plus+, sounds good but there are many who had problems with their databases after using it..

No, there is no other plugin which could cause it
I’ve made a screenshothttp://www.danielaholl.de/Apublic/Unbenannt-1.jpg
I think the left side is the WordPress registration and right the one for buddypress.. there are my custom profile fields too.

Extended Buddypress profile fields demands an additional name / username field. This is the case whether you are using Buddypress Usernames Only plugin or not.

This is only relevant if you require extended profile fields. If you don’t, then go into Buddypress settings and turn off extended profiles. That will remove the requirement for a second name on the registration / profile area.

If you want to use extended profile fields on BP, but you don’t want the second username / name field uglying up your registration flow, you can do the following.

You have to be careful with this, because if you hack it, remove the second required name / username field, or any of a dozen other solutions I’ve found – the registration will break down. You will get 500 errors, missing confirmation emails etc.

The solution I used for this is as follows.

1. Assuming you just want to use a singular Username for your site – install the Buddypress Usernames Only plugin. It says the plugin is old but it is still working as of WP version 4.7.4 (for me at least). This deals with the display / access of various username / name / fullname / nickname issues throughout the WP / Buddypress install.

2. Next you’ll need to hide the extra name / username field on the registration area, and the BP profile area. Stick this CSS into your theme custom CSS under Appearance > Customize:

(I have seen a 3rd line of CSS on other solutions – #register-page p { display: none;} – all this did for me was to hide the confirmation message after the user registers. You probably want that so I’d leave that line out).

3. The fields should now be hidden, but the system still requires that information to process properly. So next create a file in notepad and save it as name_remove.js

Save that file and upload it to your theme folder (same folder as functions.php etc). This javascript automatically populates the hidden field with the username, so the system does not complain or fall over.

4. Finally you need WordPress to pick this javascript file up. You can do that with a function, using file enqueing. Copy and paste this function into your themes functions.php file Appearance > Editor

You have to be careful about the path. If it’s not working at this point, you can view the page source of your register page, and search for “name_remove.js” – look at the path on that script line. If the path is wrong, tweak it in the function above (you might need to change the get_stylesheet_directory_uri() part, or the path part after it. You can check if the path is correct by clicking the link to the .js file in the page source. If the path is wrong, you will get a 404 error. If the path is right, you should see the script code contained in the js file. Fiddle around with the path until it’s correct.

At that point, you have hidden the fields with CSS, and populated the second hidden username / name field automatically with javascript. Test your registration / confirmation email etc to make sure everything is working. But you should be good to go.

Hope that helps someone. Thanks to the folks I cobbled this solution together from.