From: moodler Date: Sat, 27 Sep 2003 14:50:45 +0000 (+0000) Subject: Don't print city/country if there aren't any X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=71c960d5acf701a69353769bbd28bddad8670793;p=moodle.git Don't print city/country if there aren't any --- diff --git a/user/lib.php b/user/lib.php index de31c6c7d4..36b3be6197 100644 --- a/user/lib.php +++ b/user/lib.php @@ -189,7 +189,9 @@ function print_user($user, $course, $string, $countries) { if ($user->maildisplay == 1 or ($user->maildisplay == 2 and $course->category) or isteacher($course->id)) { echo "$string->email: email\">$user->email
"; } - echo "$string->location: $user->city, ".$countries["$user->country"]."
"; + if ($user->city or $user->country) { + echo "$string->location: $user->city, ".$countries["$user->country"]."
"; + } if ($user->lastaccess) { echo "$string->lastaccess: ".userdate($user->lastaccess); echo "  (".format_time(time() - $user->lastaccess, $string).")";