X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttUserHelper.class.php;fp=WEB-INF%2Flib%2FttUserHelper.class.php;h=d0a09ced86eb5a327af0746a977482b82820a2c2;hb=c819d80227f056f8b98e6a5e27884db1e40c930a;hp=538a2fc40fac4ca30903fdb7fbfd3edaeb4102b0;hpb=87dff6fdf1e60ff60fb429290488cb1c9bf778d9;p=timetracker.git 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;