This commit is contained in:
2025-10-06 18:43:38 -04:00
parent ee94b7aec1
commit 49a88f6634

View File

@@ -203,7 +203,8 @@ export function resetPasswordByEmail(email: string, newPassword: string) {
const db = getDatabase()
const saltRounds = 10
const hashedPassword = bcrypt.hashSync(newPassword, saltRounds)
return db.prepare('UPDATE users SET password = ? WHERE email = ?').run(hashedPassword, email)
const result = db.prepare('UPDATE users SET password = ? WHERE LOWER(email) = LOWER(?)').run(hashedPassword, email)
return result
}
export function getAllUsers() {