Hi @claudeschlesser
I have the same problem with BuddyPress, but when I tried to past your code (with modifications), it does not work, can you help me ?
Thank you
function login_filter_user_fields ($user_fields)
{
$user_fields['user_login'] = str_replace(' ', '', $user_fields['user_login']);
return $user_fields;
}
//This filter is applied to new users
add_filter('login_filter_new_user_fields', 'login_filter_user_fields');