summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/user.go b/api/user.go
index 787039355..e0507f399 100644
--- a/api/user.go
+++ b/api/user.go
@@ -2615,7 +2615,6 @@ func searchUsers(c *Context, w http.ResponseWriter, r *http.Request) {
}
searchOptions := map[string]bool{}
- searchOptions[store.USER_SEARCH_OPTION_USERNAME_ONLY] = true
searchOptions[store.USER_SEARCH_OPTION_ALLOW_INACTIVE] = props.AllowInactive
var uchan store.StoreChannel
@@ -2680,6 +2679,9 @@ func autocompleteUsersInChannel(c *Context, w http.ResponseWriter, r *http.Reque
return
}
+ searchOptions := map[string]bool{}
+ searchOptions[store.USER_SEARCH_OPTION_NAMES_ONLY] = true
+
uchan := Srv.Store.User().SearchInChannel(channelId, term, map[string]bool{})
nuchan := Srv.Store.User().SearchNotInChannel(teamId, channelId, term, map[string]bool{})