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 30de03673112dcf1a356985a33f34a5c32036b76 1 parent 952fef7
@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.