Be more permissive in UserLookupGET (wildcard both at start and at end of username)
This commit is contained in:
parent
c86bc1e420
commit
5320c62e17
|
@ -301,7 +301,7 @@ func UserLookupGET(md common.MethodData) common.CodeMessager {
|
|||
if name == "" {
|
||||
return common.SimpleResponse(400, "please provide an username to start searching")
|
||||
}
|
||||
name += "%"
|
||||
name = "%" + name + "%"
|
||||
rows, err := md.DB.Query("SELECT users.id, users.username FROM users WHERE username LIKE ? AND allowed = '1' LIMIT 25", name)
|
||||
if err != nil {
|
||||
md.Err(err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user