MCPcopy
hub / github.com/simstudioai/sim / getUser

Function getUser

packages/db/scripts/deregister-sso-provider.ts:61–73  ·  view source on GitHub ↗
(email: string)

Source from the content-addressed store, hash-verified

59const db = drizzle(postgresClient)
60
61async function getUser(email: string): Promise<{ id: string; email: string } | null> {
62 try {
63 const users = await db.select().from(user).where(eq(user.email, email))
64 if (users.length === 0) {
65 logger.error(`No user found with email: ${email}`)
66 return null
67 }
68 return { id: users[0].id, email: users[0].email }
69 } catch (error) {
70 logger.error('Failed to query user:', error)
71 return null
72 }
73}
74
75async function deregisterSSOProvider(): Promise<boolean> {
76 try {

Callers 1

deregisterSSOProviderFunction · 0.70

Calls 2

errorMethod · 0.80
eqFunction · 0.50

Tested by

no test coverage detected