Поиск пользователей по полю 'О себе' #101 #103

Merged
redex2000 merged 1 commits from user_search into dev_mirocod 2 years ago
  1. 1
      models/user/search.go

1
models/user/search.go

@ -45,6 +45,7 @@ func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session {
keywordCond := builder.Or(
builder.Like{"lower_name", lowerKeyword},
builder.Like{"LOWER(full_name)", lowerKeyword},
builder.Like{"LOWER(description)", lowerKeyword},
)
if opts.SearchByEmail {
keywordCond = keywordCond.Or(builder.Like{"LOWER(email)", lowerKeyword})

Loading…
Cancel
Save