Change the name displayed in user selection box

On some websites, depending on the user management policy, you could find yourself with users having the same name displayed in the dropdown allowing to select the owner.

Fortunately, there is a hook which allows you to fully customize which information is shown in that dropdown:

add_filter('cuar/core/ownership/owner-display-name?owner-type=usr', 'cuar_change_user_display_field', 10, 2);
function cuar_change_user_display_field($name, $user) { 
    // Show the user name instead of the display name
    return $user->user_login;