Skip to content

Commit ed81b60

Browse files
tyroneyehwolfogre
andauthored
Add option to search for users is active join a team (#24093)
Adding a user in a team to enter a username gives a list of no active users --------- Co-authored-by: Jason Song <[email protected]>
1 parent cfe3d6e commit ed81b60

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/web/user/search.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func Search(ctx *context.Context) {
2424
Keyword: ctx.FormTrim("q"),
2525
UID: ctx.FormInt64("uid"),
2626
Type: user_model.UserTypeIndividual,
27+
IsActive: ctx.FormOptionalBool("active"),
2728
ListOptions: listOptions,
2829
})
2930
if err != nil {

web_src/js/features/comp/SearchUserBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function initCompSearchUserBox() {
1111
$searchUserBox.search({
1212
minCharacters: 2,
1313
apiSettings: {
14-
url: `${appSubUrl}/user/search?q={query}`,
14+
url: `${appSubUrl}/user/search?active=1&q={query}`,
1515
onResponse(response) {
1616
const items = [];
1717
const searchQuery = $searchUserBox.find('input').val();

0 commit comments

Comments
 (0)