The problem with user name as identifier
It is an assumption in the app that there is a user name, and that user name is used as the identifier. That assumption isn't always correct. Sometimes a user name is used as the identifier, sometimes an email address is used, and sometimes a phone number. In some cases there might even be some kind of numeric or even UUID (hexadecimal) identifier.
My own use of the user name field is to dump whatever work as an identifier, without regard to the field name. That makes it necessary (or rather customary for me) to duplicate the value in another row. The simplest solution to this would be to rename the field to “identifier” and leave it up to the user how (s)he would interpret it. The user name would then be added in another row as other additional information.
Fancy UI ideas
It might be better to assign some field the role as identifier, and default to using a user name. If that isn't provided, then there might be a fallback chain. It should although be possible to explicitly set the correct field.
I would made a row for “identifier” with a drop-down list with entries for each of the fields. Before it is explicitly set I would spring-load the list to go to the first entry in the fallback chain, but after that it should stay on whatever choice the user made.
An alternative would be radio buttons, but in my opinion that creates a bloathed UI.