fix login duplicate name check
make sure the comparison is done in lower case for both sides0.4
parent
03efd4f62b
commit
522228971e
2
init.lua
2
init.lua
|
@ -77,7 +77,7 @@ local function check_name(name)
|
||||||
local query = ([[
|
local query = ([[
|
||||||
SELECT DISTINCT name
|
SELECT DISTINCT name
|
||||||
FROM auth
|
FROM auth
|
||||||
WHERE name = LOWER('%s') LIMIT 1;
|
WHERE LOWER(name) = LOWER('%s') LIMIT 1;
|
||||||
]]):format(name)
|
]]):format(name)
|
||||||
for row in db:nrows(query) do
|
for row in db:nrows(query) do
|
||||||
return row
|
return row
|
||||||
|
|
Loading…
Reference in New Issue