mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(core)!: use case insensitive search for emails
This commit is contained in:
parent
81aa4cd8ed
commit
f82d2a8c4f
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ export const findUserByEmail = async (email: string) =>
|
|||
envSet.pool.one<User>(sql`
|
||||
select ${sql.join(Object.values(fields), sql`,`)}
|
||||
from ${table}
|
||||
where ${fields.primaryEmail}=${email}
|
||||
where lower(${fields.primaryEmail})=lower(${email})
|
||||
`);
|
||||
|
||||
export const findUserByPhone = async (phone: string) =>
|
||||
|
@ -65,7 +65,7 @@ export const hasUserWithEmail = async (email: string) =>
|
|||
envSet.pool.exists(sql`
|
||||
select ${fields.primaryEmail}
|
||||
from ${table}
|
||||
where ${fields.primaryEmail}=${email}
|
||||
where lower(${fields.primaryEmail})=lower(${email})
|
||||
`);
|
||||
|
||||
export const hasUserWithPhone = async (phone: string) =>
|
||||
|
|
Loading…
Reference in a new issue