Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Don’t include guest users in total user count (#2094)

Luke Vella44247e5e79a0
diff --git a/apps/web/src/app/[locale]/control-panel/users/page.tsx b/apps/web/src/app/[locale]/control-panel/users/page.tsx
index a67802b0b..578273149 100644
--- a/apps/web/src/app/[locale]/control-panel/users/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/users/page.tsx
@@ -43,7 +43,9 @@ async function loadData({
notFound();
}
- const where: Prisma.UserWhereInput = {};
+ const where: Prisma.UserWhereInput = {
+ isAnonymous: false,
+ };
if (q) {
where.OR = [
diff --git a/apps/web/src/features/user/queries.ts b/apps/web/src/features/user/queries.ts
index e58bddc3a..5fcd69152 100644
--- a/apps/web/src/features/user/queries.ts
+++ b/apps/web/src/features/user/queries.ts
@@ -1,7 +1,11 @@
import { prisma } from "@rallly/database";
export const getUserCount = async () => {
- return await prisma.user.count();
+ return await prisma.user.count({
+ where: {
+ isAnonymous: false,
+ },
+ });
};
export const getUserHasPassword = async (userId: string) => {