From c819d80227f056f8b98e6a5e27884db1e40c930a Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 25 Dec 2018 13:12:55 +0000 Subject: [PATCH] Improved user count check. --- WEB-INF/lib/ttUserHelper.class.php | 4 ++-- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index 538a2fc4..d0a09ced 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -396,10 +396,10 @@ class ttUserHelper { if (!$val) return true; // No limit. $max_count = $val['param_value']; - $sql = "select count(*) as user_count from tt_users where status is not null"; + $sql = "select count(*) as user_count from tt_users where group_id > 0 and status is not null"; $res = $mdb2->query($sql); $val = $res->fetchRow(); - if ($val['user_count'] < $max_count - $num_users) // TODO: test this. + if ($val['user_count'] <= $max_count - $num_users) return true; // Limit not reached. return false; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index f3396726..3c38d433 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.36.4689 | Copyright © Anuko | +  Anuko Time Tracker 1.18.36.4690 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1