Browse Source

Merge pull request 'Поиск пользователей по полю 'О себе' #101' (#103) from user_search into dev_mirocod

Reviewed-on: http://git.mirocod.ru/MIROCOD/Platform_Mirocod/pulls/103
pull/114/head
parent
commit
7a057e4a47
  1. 1
      models/user/search.go

1
models/user/search.go

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

Loading…
Cancel
Save