saying 'never' instead of 0/0 at 0:0 when a user never connected before at main

This commit is contained in:
Benjamin Sonntag 2012-08-25 10:03:29 +00:00
parent c0ad932536
commit a5fd98d584
1 changed files with 7 additions and 3 deletions

View File

@ -37,9 +37,13 @@ include_once("menu.php");
echo "<p>";
__("Last Login: ");
echo format_date('the %3$d-%2$d-%1$d at %4$d:%5$d',$mem->user["lastlogin"]);
printf("&nbsp;"._('from: <code> %1$s </code>')."<br />",$mem->user["lastip"]);
echo "</p>";
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("&nbsp;"._('from: <code> %1$s </code>')."<br />",$mem->user["lastip"]);
}
echo "</p>";
if ($mem->user["lastfail"]) {
printf(_("%1\$d login failed since last login")."<br />",$mem->user["lastfail"]);