Just spent about 5 hours on this one, enjoy …
I’ve seen this question come up on a lot of forums – people want to use email addresses as usernames in Buddypress. It makes sense – emails are easy to remember. But Buddypress has made this difficult to do. Andy Peatling added the following constant to the core:
in order to deal with part of this problem. But this did not solve the problem completely. See this article for how to use this. This changed allowed users to navigate to an @-containing username’s profile, but that user could not do things like create groups or edit his profile.
It turns out there’s another step to getting this to work. You have to override wp_sanitize_redirect in wp-includes/pluggable.php and add ‘@’ to the list of OK characters, like this:
-
function wp_sanitize_redirect($location) {
-
$location = preg_replace(‘|[^a-z0-9-~+_.?#=&;,/:%!@]|i’, ”, $location); //this line needs to have an @
-
$location = wp_kses_no_null($location);
-
-
// remove %0d and %0a from location
-
$location = _deep_replace($strip, $location);
-
return $location;
-
}
Now it should work.
This just solved a huge pain in my ass, thank you!
Have you ran into any troubles with bp_the_topic_post_poster_link() ?