Browse files

Guests can no longer see email addresses if "show only to course part…

…icipants"

has been set by that user
  • Loading branch information...
1 parent 8a39753 commit d0ec93fbd633b1601b9aca10be19ddaf97ae9081 moodler committed Mar 24, 2004
Showing with 4 additions and 2 deletions.
  1. +1 −1 lib/weblib.php
  2. +3 −1 user/view.php
View
2 lib/weblib.php
@@ -1230,7 +1230,7 @@ function print_user($user, $course) {
if (!empty($user->role) and ($user->role <> $course->teacher)) {
echo "$string->role: $user->role<br />";
}
- if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category) or $isteacher) {
+ if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category and !isguest()) or $isteacher) {
echo "$string->email: <a href=\"mailto:$user->email\">$user->email</a><br />";
}
if ($user->city or $user->country) {
View
4 user/view.php
@@ -124,7 +124,9 @@
}
}
- if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category) or isteacher($course->id)) {
+ if ($user->maildisplay == 1 or
+ ($user->maildisplay == 2 and $course->category and !isguest()) or
+ isteacher($course->id)) {
if (isteacheredit($course->id) or $currentuser) { /// Can use the enable/disable email stuff
if (!empty($_GET['enable'])) { /// Recieved a paramter to enable the email address

0 comments on commit d0ec93f

Please sign in to comment.