- 
	
	Henry Wright replied to the topic Username problems in the forum How-to & Troubleshooting 10 years, 5 months ago If you wanted to, you could disallow spaces in usernames by validating the field during registration. This is how you’d do it: function zenimot_validate_username() {$bp = buddypress(); if ( strpos( $_POST['signup_username'], ' ' ) !== false ) { 
 $bp->signup->errors['signup_username'] = __( 'Spaces are not allowed',…[Read more]
- 
	
	Henry Wright replied to the topic Username problems in the forum How-to & Troubleshooting 10 years, 5 months ago If you wanted to, you could just remove spaces in usernames by validating the field during registration. This is how you’d do it: function zenimot_validate_username() {$bp = buddypress(); if ( strpos( $_POST['signup_username'], ' ' ) !== false ) { 
 $bp->signup->errors['signup_username'] = __( 'Spaces are not allowed',…[Read more]
- 
	
	Henry Wright replied to the topic Username problems in the forum How-to & Troubleshooting 10 years, 5 months ago If you wanted to, you could just remove spaces in usernames by validating the field during registration. This is how you’d do it: function zenimot_validate_username() {[Read more]
 // Remove spaces from username.
 $_POST['signup_username'] = str_replace( ' ', '', $_POST['signup_username'] );
 }
 add_action( 'bp_signup_pre_validate',…
- 
	
	Henry Wright replied to the topic Username problems in the forum How-to & Troubleshooting 10 years, 5 months ago If you wanted to, you could enforce no spaces in usernames by validating the field during registration. This is how you’d do it: function zenimot_validate_username() {[Read more]
 // Remove spaces from username.
 $_POST['signup_username'] = str_replace( ' ', '', $_POST['signup_username'] );
 }
 add_action( 'bp_signup_pre_validate',…
- 
	
	Henry Wright replied to the topic Username problems in the forum How-to & Troubleshooting 10 years, 5 months ago 
	@zenimot
	Active 5 years, 1 month ago