From a5fd98d58494ddc55671e427bf92a7e3666def01 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sat, 25 Aug 2012 10:03:29 +0000 Subject: [PATCH] saying 'never' instead of 0/0 at 0:0 when a user never connected before at main --- bureau/admin/main.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bureau/admin/main.php b/bureau/admin/main.php index 5acd10d3..d521dd4e 100644 --- a/bureau/admin/main.php +++ b/bureau/admin/main.php @@ -37,9 +37,13 @@ include_once("menu.php"); echo "

"; __("Last Login: "); -echo format_date('the %3$d-%2$d-%1$d at %4$d:%5$d',$mem->user["lastlogin"]); -printf(" "._('from: %1$s ')."
",$mem->user["lastip"]); -echo "

"; +if ($mem->user["lastlogin"]=="0000-00-00 00:00:00") { + __("Never"); +} else { + echo format_date('the %3$d-%2$d-%1$d at %4$d:%5$d',$mem->user["lastlogin"]); + printf(" "._('from: %1$s ')."
",$mem->user["lastip"]); +} + echo "

"; if ($mem->user["lastfail"]) { printf(_("%1\$d login failed since last login")."
",$mem->user["lastfail"]);