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.
pull/2433/head
Mathias Haugsbø 1 year ago
parent b58b83541b
commit c79b2913a2

@ -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,
]);

Loading…
Cancel
Save