The preference $user->maildisplay is confusing:
- hiding your email does not hide it from teachers/admins with viewuseridentity capability, this is not clear to the users
- the default setting is to display email to other course members which is not necessary
- the preference is located inside user profile and not on preferences page, it is easy to miss
- it is respected in some cases but not others
- no modern websites publish users emails to other users, if the particular university wants users to see each other's email addresses they can do so by giving them capability; if the user wants to show their email address they can include it in the description
- Admins can and have been confused while trying to hide all users emails, because if this setting is set the user's email will still display
The suggestion is to remove the setting and in all current usages consider it to be 0 (do not show email).