Skip to content
Browse files

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

…l field in user profile
  • Loading branch information...
1 parent 222ada3 commit b48ceab75b765f08f50997c77ba734b8020d132d @ankitagarwal ankitagarwal committed Aug 27, 2012
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, ''));
}

0 comments on commit b48ceab

Please sign in to comment.
Something went wrong with that request. Please try again.