Permalink
Browse files

Allow admin to consult user email address

  • Loading branch information...
fabiomsouto committed May 18, 2012
1 parent 2ddb941 commit 660b8d0b6645d60e2b01f44190197e2bcb1a6581
Showing with 2 additions and 1 deletion.
  1. +2 −1 user/lib.php
View
@@ -312,7 +312,8 @@ function user_get_user_details($user, $course = null) {
if ($currentuser
or $canviewuseremail // this is a capability in course context, it will be false in usercontext
or $user->maildisplay == 1
- or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER))) {
+ or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER))
+ or $isadmin) {
$userdetails['email'] = $user->email;;
}

0 comments on commit 660b8d0

Please sign in to comment.