Bugfix on user search page

This commit is contained in:
Noah Petherbridge 2023-10-10 18:03:05 -07:00
parent de5059c51c
commit 09ba634556

View File

@ -269,7 +269,7 @@ func SearchUsers(user *User, search *UserSearch, pager *Pagination) ([]*User, er
if search.Username != "" {
ilike := "%" + strings.TrimSpace(strings.ToLower(search.Username)) + "%"
wheres = append(wheres, "username LIKE ? OR name ILIKE ?")
wheres = append(wheres, "(username LIKE ? OR name ILIKE ?)")
placeholders = append(placeholders, ilike, ilike)
}