I'm not sure, but I think it started happening after upgrading Wordpress to multisite (WPMU). Is there a way to debug it to identify the problem? I deactivated all the plug-ins and the error still happens.
I identified some lines of code that can be related to the problem:
"
wp-admin\includes\user.php"
if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) )
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
"public_html\
wp-login.php"
// Check the username
if ( $sanitized_user_login == '' ) {
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
} elseif ( ! validate_username( $user_login ) ) {
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
$sanitized_user_login = '';
} elseif ( username_exists( $sanitized_user_login ) ) {
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
}
"
wp-content\themes\classipress\framework\includes\view s-login.php"
// Check the username
if ( $sanitized_user_login == '' ) {
$errors->add( 'empty_username', __('<strong>ERROR</strong>: Please enter a username.', APP_TD) );
} elseif ( ! validate_username( $posted['user_login'] ) ) {
$errors->add( 'invalid_username', __('<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.', APP_TD) );
$sanitized_user_login = '';
} elseif ( username_exists( $sanitized_user_login ) ) {
$errors->add( 'username_exists', __('<strong>ERROR</strong>: This username is already registered, please choose another one.', APP_TD) );
}