Username case insensitive, patch db instead of using LIKE

This commit is contained in:
Mathias Haugsbø 2022-12-19 12:18:33 +01:00
parent c79b2913a2
commit b3ac7c3d43
3 changed files with 49 additions and 1 deletions

View file

@ -15,7 +15,7 @@ exports.login = async function (username, password) {
return null;
}
let user = await R.findOne("user", " username LIKE ? AND active = 1 ", [
let user = await R.findOne("user", " username = ? AND active = 1", [
username,
]);