use css text-transform property
{text-transform:uppercase;} = all the word
{text-transform:capitalize;} = the first letter of a word
@Chouf1 If I understand correctly, I can insert those 2 CSS properties anywhere in my stylesheet and if someone registers with a username such as JohnDoe, the won’t be an error message?
Salut,
Gene
I’ve run in to this with importing a userbase to a Buddypress install. WordPress likes login names to be lowercase, with no spaces, and no non-alphanumerics (except, I think for dashes (‘-‘).
Users can, of course, make their display name anything they like.
The follow-on problem though, is with @username notifications in BP1.2+, which work on the login name and not the display name, so if a user has the login username johnsmith and the display name John, only @johnsmith will work.
(I’ve also just recently encountered a problem in that usernames with dashes cause @notifications to fail. That is, if a username is johnsmith, @johnsmith works, but if his username is john-smith @john-smith fails.)
CSS is only a solution for display.
stwc is right.
Did you read this ?
https://buddypress.org/forums/topic/bp-fbconnect-usernames-with-foreign-characters#post-25347
there is, maybe, a solution in the post.: a plugin as below to allow non-ansi character account name
typcally a good question for @DJPaul i think….
Here we go – easier than I thought it would be to fix this.
Go to bp-core/bp-core-signup.php and find the following line:
$account_details = bp_core_validate_user_signup( $_POST['signup_username'], $_POST['signup_email'] );
Add this line directly below it:
$account_details=strtolower($account_details);
It just transforms usernames typed in multiple cases in the username field to only lowercase letters.
avoid hacking the core – you can use the filter
apply_filters( 'bp_core_validate_user_signup'
which returns an array of user_name, user_email, errors after bp_core_validate_user_signup
fires
You’re probably right about that….
Sorry – I’m still getting to grips with everything PHP and Buddypress – where would you add that filter?
actually, after looking over the signup – that woudn’t be the correct filter; seems $bp->signup->username = $_POST['signup_username'];
is assigned after
i would like to add this to my functions.php, anyone know how that would look like?