Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.2
-
Fix Version/s: None
-
Component/s: Usability
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
Users can choose the audience they show their e-mail address to.
There are other fields with sensitive information: strett address, phone number. Showing those fileds is controlled by 'moodle/user:viewhiddendetails' capability. However, e-mail address is not. If the user set email "hidden to anybody", no one will see the address.
So, the more useful and required info as "hiddendetail" is missing. We can contact a user by phone or home-mail, but not by the less intrusive e-mail.
I think it would be better to associate e-mail address with 'moodle/user:viewhiddendetails' capability, like the rest of sensitive fields.
In user/view.php by line 251 write
if ($user->maildisplay == 1 or
($user->maildisplay == 2 and ($course->id != SITEID) and !isguest()) or
has_capability('moodle/course:useremail', $coursecontext) OR
has_capability('moodle/user:viewhiddendetails', $coursecontext) ) { <<<<<<<<<<<<<<<<<<<<
adding the last OR to allow users with viewhiddendetails capability to access teh e-mail address
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions