diff options
author | Simon Rettberg | 2018-04-12 20:44:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-04-12 20:44:25 +0200 |
commit | 26b2103a01cdde7907debde987c0b47f8c8a889e (patch) | |
tree | 1746fa7d4f79623ca265575e6621216d8ba885dc | |
parent | [dozmod] Properly sort "last login" column in user list (diff) | |
download | slx-admin-26b2103a01cdde7907debde987c0b47f8c8a889e.tar.gz slx-admin-26b2103a01cdde7907debde987c0b47f8c8a889e.tar.xz slx-admin-26b2103a01cdde7907debde987c0b47f8c8a889e.zip |
[dozmod] Don't show 1.1.1970 for users that never logged in
-rw-r--r-- | modules-available/dozmod/pages/users.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/dozmod/pages/users.inc.php b/modules-available/dozmod/pages/users.inc.php index a81bcb8b..50f0f763 100644 --- a/modules-available/dozmod/pages/users.inc.php +++ b/modules-available/dozmod/pages/users.inc.php @@ -43,10 +43,13 @@ class SubPage . ' ORDER BY lastname ASC, firstname ASC'); $rows = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + settype($row['lastlogin'], 'int'); $row['canlogin'] = self::checked($row['canlogin']); $row['issuperuser'] = self::checked($row['issuperuser']); $row['emailnotifications'] = self::checked($row['emailnotifications']); - $row['lastlogin_s'] = date('d.m.Y', $row['lastlogin']); + if ($row['lastlogin'] !== 0) { + $row['lastlogin_s'] = date('d.m.Y', $row['lastlogin']); + } $rows[] = $row; } Render::addTemplate('userlist', array( |