Auth: Case insensitive login check on username

Allows users to add users with capital letters and then login with just lowercase letters.

We accidentally capitalized the first letter of our username so the other people using it frequently thinks they wrote the wrong password.
This commit is contained in:
Mathias Haugsbø 2022-12-18 17:16:19 +01:00
parent b58b83541b
commit c79b2913a2

View File

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