Change code for user sanitize

In class-enrollmentpopup.php on line 427 this code:
$username = sanitize_text_field( $data->data->username );
Should be changed to this one:
$username = sanitize_user( $data->data->username );