We have recently stumbled across a bug that was mentioned by Marina in https://moodle.org/mod/forum/discuss.php?d=325559#p1308853. We encourage students to set their email address to Only other course members. In the past this enabled email addresses to be seen in the profile. We are on Moodle 3.23 and this functionality is not working as intended. We have tested this with multiple demo student accounts and cannot get this to work.
Steps to recreate:
1) create two demo user accounts and set their email display dropdown to: Allow only other course members to see my email address.
2) Enroll both students in a demo course.
3) Add the people block for quick access to the profiles of students.
4) Login as one of the demo accounts > click on the participant list > and click on the other user account you created.
5) Confirm that the user's email does not appear to the student.
Expected Results - accounts with Display Email address should show that email address.