Skip to main content

get_user_by_email

Retrieves a user record from the database matching the specified email address using the provided database session.

def get_user_by_email(
session: Session,
email: string
) - > User | None

Retrieves a user record from the database based on a unique email address.

Parameters

NameTypeDescription
sessionSessionThe active database session used to execute the selection query.
emailstringThe unique email address used to identify and locate the specific user record.

Returns

TypeDescription
`UserNone`