Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BP adding -2 when spaces are included in username

Michel, this forum is quietest at weekends. Please allow a day or two before re-posting to a topic; if you haven’t had a response, then people probably don’t have an answer.

As you can tell from the trac ticket you found, when it was previously reported, no-one figured out exactly why this was happening, so we couldn’t fix it. Looking at a comment on the ticket now, someone seems to think that if you put the following line into your theme’s functions.php, it might resolve the issue:

remove_action( 'pre_user_login', 'bp_core_strip_username_spaces' );

If the ticket covers the same problem that you have, this might be a fix. You can tell by creating a new user account once you’ve put that into your functions.php. I cannot guarantee that this would not cause any other issues. Indeed, I can’t understand why BuddyPress does this anyway, without spending a couple of hours investigating.

The issue seems to be the presence of spaces in the username/log in name. If this does fix your issue, please would you give us a sample of username/log in name so I can investigate.

Skip to toolbar