Hi,
I would like to have some more opinions before moving MDL-60548 forward. The conditions we apply (3.1 onwards) to show/hide someone's email are not very intuitive. At the moment all other conditions are subject to the email being part of the identity fields ('showuseridentity' setting) and this is not ideal because 'Show user identity' setting serves a different purpose (https://docs.moodle.org/34/en/User_policies#Show_user_identity) In MDL-60548 we are trying to find an alternative solution that removes 'showuseridentity' restriction and still allows admins to hide all users email as we currently do through 'showuseridentity' setting. David Balch proposed to add 'email' to 'Hide user fields' setting (https://docs.moodle.org/34/en/User_policies#Hide_user_fields) which sounds ok to me. I've completed his proposal in https://tracker.moodle.org/browse/MDL-60548?focusedCommentId=494663&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-494663. Related issues that would be resolved by this approach are MDL-60191 and MDL-50534.
It would be great to have some feedback about MDL-37479 (deprecate course:useremail capability) and MDL-51630 (combine course:viewhiddenuserfields and user:viewhiddendetails capabilities) as well, both related to user email display.