fix login duplicate name check

make sure the comparison is done in lower case for both sides
0.4
shivajiva101 2017-12-01 22:11:22 +00:00 committed by GitHub
parent 03efd4f62b
commit 522228971e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ local function check_name(name)
local query = ([[
SELECT DISTINCT name
FROM auth
WHERE name = LOWER('%s') LIMIT 1;
WHERE LOWER(name) = LOWER('%s') LIMIT 1;
]]):format(name)
for row in db:nrows(query) do
return row