mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor: filter out suspended users in hasActiveUsers()
This commit is contained in:
parent
dd776eeb15
commit
54ef69d4f4
2 changed files with 2 additions and 0 deletions
|
@ -202,6 +202,7 @@ export const createUserQueries = (pool: CommonQueryMethods) => {
|
|||
pool.exists(sql`
|
||||
select ${fields.id}
|
||||
from ${table}
|
||||
where ${fields.isSuspended} = false
|
||||
limit 1
|
||||
`);
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ const alteration: AlterationScript = {
|
|||
select id
|
||||
from users
|
||||
where tenant_id = 'admin'
|
||||
and is_suspended = false
|
||||
limit 1
|
||||
`);
|
||||
await pool.query(sql`
|
||||
|
|
Loading…
Reference in a new issue