From: Nik Okuntseff Date: Tue, 25 Dec 2018 13:12:55 +0000 (+0000) Subject: Improved user count check. X-Git-Tag: timetracker_1.19-1~376 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c819d80227f056f8b98e6a5e27884db1e40c930a;p=timetracker.git Improved user count check. --- 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}