]> git.mjollnir.org Git - moodle.git/commitdiff
Don't print city/country if there aren't any
authormoodler <moodler>
Sat, 27 Sep 2003 14:50:45 +0000 (14:50 +0000)
committermoodler <moodler>
Sat, 27 Sep 2003 14:50:45 +0000 (14:50 +0000)
user/lib.php

index de31c6c7d47fff584dc315de9292f3f84e5e98c9..36b3be61973eac28a5d2f06f99540b955425efde 100644 (file)
@@ -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: <A HREF=\"mailto:$user->email\">$user->email</A><BR>";
     }
-    echo "$string->location: $user->city, ".$countries["$user->country"]."<BR>";
+    if ($user->city or $user->country) {
+        echo "$string->location: $user->city, ".$countries["$user->country"]."<BR>";
+    }
     if ($user->lastaccess) {
         echo "$string->lastaccess: ".userdate($user->lastaccess);
         echo "&nbsp (".format_time(time() - $user->lastaccess, $string).")";