Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-31520-MOODLE_22_STABLE' of git://github.com/fabioms…

…outo/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit 65d7459b6d50c542a3493ee566bd72f02645c20a 2 parents 6a27fc8 + cd358c6
Sam Hemelryk samhemelryk authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 user/lib.php
5 user/lib.php
@@ -356,8 +356,9 @@ function user_get_user_details($user, $course = null, array $userfields = array(
356 356 if (in_array('email', $userfields) && ($currentuser
357 357 or $canviewuseremail // this is a capability in course context, it will be false in usercontext
358 358 or $user->maildisplay == 1
359   - or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER)))) {
360   - $userdetails['email'] = $user->email;;
  359 + or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER))
  360 + or $isadmin)) {
  361 + $userdetails['email'] = $user->email;
361 362 }
362 363
363 364 if (in_array('interests', $userfields) && !empty($CFG->usetags)) {

0 comments on commit 65d7459

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