Convert usernames listed by the Groups plugin shortcode to displayed names?

Bellow is the adapted function (by 24 rows shorter than the original), as was suggested by the commenters (many thanks!). It will work only if the Groups plugin was installed and activated.

add_shortcode( 'groups_group_info', 'groups_group_info' );

function groups_group_info( $atts, $content = null ) {
global $wpdb;
$output = "";
$options = shortcode_atts(
    array(
        'group' => '',
        'show' => '',
        'format' => '',
        'single' => '1',
        'plural' => '%d'
    ),
    $atts
);
$group = trim( $options['group'] );
$current_group = Groups_Group::read( $group );
if ( !$current_group ) {
    $current_group = Groups_Group::read_by_name( $group );
}
if ( $current_group ) {
            $user_group_table = _groups_get_tablename( "user_group" );
            $users = $wpdb->get_results( $wpdb->prepare(
                "SELECT * FROM $wpdb->users LEFT JOIN $user_group_table ON $wpdb->users.ID = $user_group_table.user_id WHERE $user_group_table.group_id = %d",
                Groups_Utility::id( $current_group->group_id )
            ) );
            if ( $users ) {
                $output .= '<ul>';
                foreach( $users as $user ) {
                    $output .= '<li>' . wp_filter_nohtml_kses( $user->display_name ) . '</li>';
                }
                $output .= '</ul>';
            }
}
return $output;
}