@carlotafuro
Active 6 years, 10 months ago
-
Carlo Tafuro replied to the topic Allow Underscores in Username in the forum How-to & Troubleshooting 6 years, 10 months ago
Here’s my solution:
add_filter( 'wpmu_validate_user_signup', 'my_wpmu_validate_user_signup' );
function my_wpmu_validate_user_signup( $result ) {
$underscores_error_message = __( 'Sorry, usernames may not contain the character "_"!', 'buddypress' );
$error_messages_array = $result[ 'errors' ]->get_error_messages('user_name');
if ( c…[Read more]