Permalink
Browse files

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

…l field in user profile
  • Loading branch information...
1 parent 952fef7 commit 30de03673112dcf1a356985a33f34a5c32036b76 @ankitagarwal ankitagarwal committed Aug 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 user/profile.php
View
@@ -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 30de036

Please sign in to comment.