- {filter !== 'all' || filterKeywords.length > 0
+ {filterUserType !== 'all' || filterKeywords.length > 0
? 'No users found'
: 'No users in your project'}
- {filter !== 'all' || filterKeywords.length > 0
+ {filterUserType !== 'all' || filterKeywords.length > 0
? 'There are currently no users based on the filters applied'
: 'There are currently no users who signed up to your project'}
@@ -597,7 +628,7 @@ export const UsersV2 = () => {
`dashboard-history-${ref}`,
STORAGE_PREFERENCE: (ref: string) => `storage-explorer-${ref}`,
+ AUTH_USERS_FILTER: (ref: string) => `auth-users-filter-${ref}`,
+ AUTH_USERS_COLUMNS_CONFIGURATION: (ref: string) => `supabase-auth-users-columns-${ref}`,
+
SQL_EDITOR_INTELLISENSE: 'supabase_sql-editor-intellisense-enabled',
SQL_EDITOR_SPLIT_SIZE: 'supabase_sql-editor-split-size',
// Key to track which schemas are ok to be sent to AI. The project ref is intentionally put at the end for easier search in the browser console.
@@ -60,7 +63,6 @@ export const LOCAL_STORAGE_KEYS = {
FLY_POSTGRES_DEPRECATION_WARNING: 'fly-postgres-deprecation-warning-dismissed',
API_KEYS_FEEDBACK_DISMISSED: (ref: string) => `supabase-api-keys-feedback-dismissed-${ref}`,
MIDDLEWARE_OUTAGE_BANNER: 'middleware-outage-banner-2025-05-16',
- AUTH_USERS_COLUMNS_CONFIGURATION: (ref: string) => `supabase-auth-users-columns-${ref}`,
REPORT_DATERANGE: 'supabase-report-daterange',
// api keys view switcher for new and legacy api keys
diff --git a/packages/pg-meta/src/sql/studio/get-users-paginated.ts b/packages/pg-meta/src/sql/studio/get-users-paginated.ts
index 44ea342adc6cd..edd2b9e821e9c 100644
--- a/packages/pg-meta/src/sql/studio/get-users-paginated.ts
+++ b/packages/pg-meta/src/sql/studio/get-users-paginated.ts
@@ -109,7 +109,7 @@ export const getPaginatedUsersSQL = ({
const sortOn = sort ?? 'created_at'
const sortOrder = order ?? 'desc'
- let actualQuery = `${conditions.length > 0 ? ` where ${combinedConditions}` : ''}
+ let whereStatement = `${conditions.length > 0 ? ` where ${combinedConditions}` : ''}
order by
"${sortOn}" ${sortOrder} nulls last
limit
@@ -119,22 +119,21 @@ export const getPaginatedUsersSQL = ({
`
// DON'T TOUCH THESE QUERIES. ONE CHARACTER OFF AND DISASTER.
- let firstOperator = startAt ? '>' : '>='
+ const firstOperator = startAt ? '>' : '>='
if (column === 'email') {
const range = stringRange(keywords ?? '')
- actualQuery = `where lower(email) ${firstOperator} '${startAt ? startAt : range[0]}' ${range[1] ? `and lower(email) < '${range[1]}'` : ''} and instance_id = '00000000-0000-0000-0000-000000000000'::uuid order by instance_id, lower(email) asc limit ${limit}`
+ whereStatement = `where lower(email) ${firstOperator} '${startAt ? startAt : range[0]}' ${range[1] ? `and lower(email) < '${range[1]}'` : ''} and instance_id = '00000000-0000-0000-0000-000000000000'::uuid order by instance_id, lower(email) asc limit ${limit}`
} else if (column === 'phone') {
const range = stringRange(keywords ?? '')
-
- actualQuery = `where phone ${firstOperator} '${startAt ? startAt : range[0]}' ${range[1] ? `and phone < '${range[1]}'` : ''} order by phone asc limit ${limit}`
+ whereStatement = `where phone ${firstOperator} '${startAt ? startAt : range[0]}' ${range[1] ? `and phone < '${range[1]}'` : ''} order by phone asc limit ${limit}`
} else if (column === 'id') {
const isMatchingUUIDValue = prefixToUUID(keywords ?? '', false) === keywords
if (isMatchingUUIDValue) {
- actualQuery = `where id = '${keywords}' order by id asc limit ${limit}`
+ whereStatement = `where id = '${keywords}' order by id asc limit ${limit}`
} else {
- actualQuery = `where id ${firstOperator} '${startAt ? startAt : prefixToUUID(keywords ?? '', false)}' and id < '${prefixToUUID(keywords ?? '', true)}' order by id asc limit ${limit}`
+ whereStatement = `where id ${firstOperator} '${startAt ? startAt : prefixToUUID(keywords ?? '', false)}' and id < '${prefixToUUID(keywords ?? '', true)}' order by id asc limit ${limit}`
}
}
@@ -156,7 +155,7 @@ export const getPaginatedUsersSQL = ({
auth.users.updated_at
from
auth.users
- ${actualQuery}`
+ ${whereStatement}`
let usersQuery = `
with