From d21fef3a02561ea65c4d2c9641f98752149ecc3a Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 6 Sep 2002 15:10:36 +0000 Subject: [PATCH] Don't try and print the last access date if it doesn't exist --- user/view.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/user/view.php b/user/view.php index 17e67cb5fc4..b73f316ebf2 100644 --- a/user/view.php +++ b/user/view.php @@ -106,7 +106,11 @@ print_row("ICQ:","icq\">$user->icq icq&img=5\" WIDTH=18 HEIGHT=18 BORDER=0>"); } - $datestring = userdate($user->lastaccess)."  (".format_time(time() - $user->lastaccess).")"; + if ($user->lastaccess) { + $datestring = userdate($user->lastaccess)."  (".format_time(time() - $user->lastaccess).")"; + } else { + $datestring = "-"; + } print_row(get_string("lastaccess").":", $datestring); echo "";