For what it's worth and for the benifit of anyone looking for a solution to this I managed to trace through all the relevant moodle code to find a solution. In the latest version of moodle at time of writing (moodle 3.9.1), you just need to add one small
line of code to the lib/moodlelib.php file. This is to add the "auth" type (email, LDAP, manual, etc) to the list of identifiers used will suggesting potential users to enrol. This change will mean that the auth time is always displayed
as one of the identifiers when manually enrolling a user to a space. The get_extra_user_fields() function is called when fetching potential users to enrol. There are probably other ways of doing this, but this wored for me.
Note also that this the value for "auth" is also available in the enrol/manual/template/form-user-selector-suggestion.mustache template as {{auth}} should you wish to add extra emphasis to it.
Update: lib/moodlelib.php
function get_extra_user_fields($context, $already = array()) {
global $CFG;
// Only users with permission get the extra fields.
if (!has_capability('moodle/site:viewuseridentity', $context)) {
return array();
}
// Split showuseridentity on comma (filter needed in case the showuseridentity is empty).
$extra = array_filter(explode(',', $CFG->showuseridentity));
array_push($extra, "auth");
foreach ($extra as $key => $field) {
if (in_array($field, $already)) {
unset($extra[$key]);
}
}
… more code …
return $extra;
}
In the resulting suggested users to enrol, this will output something similar to:
Joe Bloggs joe.bloggs@exampleuni.ac.uk, ldap
Obviously this fix will need to be reapplied after every moodle update as get_extra_user_fields() will get overwritten with the new version of moodle.
Hope thisis useful to someone.