The work to ensure all moodle views respect "showuseridentity" was largely done in https://tracker.moodle.org/browse/MDL-26647 - which is great. However, if a site has utilised additional profile fields via https://docs.moodle.org/30/en/User_profile_fields, these cannot be referenced within the showuseridentity list (as only those in mdl_user can be referenced) and hence cannot appear on user lists or gradebook lists, etc.
This creates an inconsistency.
When looking, the moodle user profile loads user_get_user_details which if the profile fields list includes the value 'customfields' exists, then cycle through the list of additional profile fields and include them. Can we please have the same processing elsewhere where it references "showuseridentify" so that additional profile fields can be included.