Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-26882 profile: Applying cap check (site:viewuseridentity) to emai…

…l field in user profile
  • Loading branch information...
commit b48ceab75b765f08f50997c77ba734b8020d132d 1 parent 222ada3
@ankitagarwal ankitagarwal authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 user/profile.php
View
5 user/profile.php
@@ -277,10 +277,11 @@
print_row(get_string("idnumber").":", "$user->idnumber");
}
-if ($currentuser
+if (($currentuser
or $user->maildisplay == 1
or has_capability('moodle/course:useremail', $context)
- or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER))) {
+ or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER)))
+ and isset($identityfields['email'])) {
print_row(get_string("email").":", obfuscate_mailto($user->email, ''));
}
Please sign in to comment.
Something went wrong with that request. Please try again.