X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/87dff6fdf1e60ff60fb429290488cb1c9bf778d9..c819d80227f056f8b98e6a5e27884db1e40c930a:/WEB-INF/lib/ttUserHelper.class.php 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;