Improved user count check.
authorNik Okuntseff <support@anuko.com>
Tue, 25 Dec 2018 13:12:55 +0000 (13:12 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 25 Dec 2018 13:12:55 +0000 (13:12 +0000)
WEB-INF/lib/ttUserHelper.class.php
WEB-INF/templates/footer.tpl

index 538a2fc..d0a09ce 100644 (file)
@@ -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;
index f339672..3c38d43 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.36.4689 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.36.4690 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>