The browse list of users in "Forum Subscriber" (Forum administration > Show/edit current subscribers) and the user selector when changing a quiz setting for a particular user (Quiz administration > User overrides > Add user override - Override user field) is not taking into account the $CFG->showuseridentity config settings and the moodle/site:viewuseridentity capability to see emails.
Steps to reproduce it:
1. Create a course
2. Create a quiz in the course.
3. Go to Site administration > Users > Permissions > User policies and make sure you have all checkboxes unchecked for the "Show user identity" setting.
4. Make sure the capability to see full user identity in lists (moodle/site:viewuseridentity) is set to 'No'
5. Go to the course and click on "News forum", then go to Forum administration > Show/edit current subscribers
Result: The list of subscribers and their emails.
Expected: The list of subscribers without their emails.
6. Go to the course an click over the quiz created in the step #2, then go to Quiz administration > User overrides > Add user override and see the Override user field.
Result: The user selector contains a list of users and their emails.
Expected: The user selector contains a list of users with just their full names (without emails).