END AS usr_alias_or_display_name,
REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
- COALESCE(u.family_name, ''),
- COALESCE(u.suffix, ''),
+ COALESCE(u.pref_family_name, u.family_name, ''),
+ COALESCE(u.pref_suffix, u.suffix, ''),
', ',
- COALESCE(u.prefix, ''),
- COALESCE(u.first_given_name, ''),
- COALESCE(u.second_given_name, '')
+ COALESCE(u.pref_prefix, u.prefix, ''),
+ COALESCE(u.pref_first_given_name, u.first_given_name, ''),
+ COALESCE(u.pref_second_given_name, u.second_given_name, '')
], ' '), E'\\s+,', ',') AS usr_display_name,
uc.id AS ucard_id, uc.barcode AS ucard_barcode, uc.usr AS ucard_usr, uc.active AS ucard_active,