From: Valerie Pond Date: Tue, 7 Feb 2023 02:01:52 +0000 (+0000) Subject: Fix "last login" meta and display on PanelUsers page X-Git-Tag: 0.9~333 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/e99963566d0ec3ccb0f96837a20c082f71e3e15c?hp=--cc Fix "last login" meta and display on PanelUsers page --- e99963566d0ec3ccb0f96837a20c082f71e3e15c diff --git a/login/index.php b/login/index.php index ea24e29..4c625e2 100644 --- a/login/index.php +++ b/login/index.php @@ -28,7 +28,7 @@ if (!empty($_POST)) { $_SESSION['id'] = $user->id; header('Location: ' . $redirect); - $user->add_meta("last_login", date("Y-m-d m:i:s")); + $user->add_meta("last_login", date("Y-m-d H:i:s")); Hook::run(HOOKTYPE_USER_LOGIN, $user); die(); } diff --git a/misc/strings.php b/misc/strings.php index b6f7d24..8ba9b21 100644 --- a/misc/strings.php +++ b/misc/strings.php @@ -70,7 +70,6 @@ function how_long_ago($timestamp) { $now = time(); $diff = $now - strtotime($timestamp); - $units = array( 31536000 => 'year', 2592000 => 'month', diff --git a/settings/index.php b/settings/index.php index 540d04b..ba3427d 100644 --- a/settings/index.php +++ b/settings/index.php @@ -146,11 +146,14 @@ Click on a username to view more information. echo "".$user->bio.""; $last = (isset($user->user_meta['last_login'])) ? "".$user->user_meta['last_login'] . " ".how_long_ago($user->user_meta['last_login'])."" : "none"; echo "$last"; - echo ""; + echo "\n"; } - ?>

+