v3: added password change/reset feature
This commit is contained in:
@@ -85,6 +85,15 @@ export function getUserByUsername(username: string): User {
|
||||
return userRowToApi(userRow);
|
||||
}
|
||||
|
||||
export function getUserByEmail(email: string): User | null {
|
||||
const userRow = db.prepare(
|
||||
`${USER_SELECT} WHERE u.email = ?`,
|
||||
).get(email);
|
||||
|
||||
if (!userRow || !isUserRow(userRow)) return null;
|
||||
return userRowToApi(userRow);
|
||||
}
|
||||
|
||||
export function searchUsers(
|
||||
query: string,
|
||||
limit: number,
|
||||
|
||||
Reference in New Issue
Block a user