From aa02497c95dfec6881b08e347cb122ea55fd16ba Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Mon, 11 Nov 2024 11:11:52 -0600 Subject: [PATCH] perf --- apps/meteor/app/api/server/lib/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/api/server/lib/users.ts b/apps/meteor/app/api/server/lib/users.ts index fc521d0552c66..aa99d92166678 100644 --- a/apps/meteor/app/api/server/lib/users.ts +++ b/apps/meteor/app/api/server/lib/users.ts @@ -185,7 +185,7 @@ export async function findPaginatedUsersByStatus({ if (searchTerm?.trim()) { match.$or = [ - ...(canSeeAllUserInfo ? [{ 'emails.address': { $regex: `^${escapeRegExp(searchTerm || '')}` } }] : []), + ...(canSeeAllUserInfo ? [{ 'emails.address': { $regex: escapeRegExp(searchTerm || ''), $options: 'i' } }] : []), { username: { $regex: escapeRegExp(searchTerm || ''), $options: 'i' }, },