PERF: Prefer joins over `IN ()` queries.

PERF: Prefer joins over IN () queries.

diff --git a/app/models/user_search.rb b/app/models/user_search.rb
index 8881f2a..088c91b 100644
--- a/app/models/user_search.rb
+++ b/app/models/user_search.rb
@@ -23,9 +23,8 @@ class UserSearch
     users = users.where(staged: false) unless @include_staged_users
 
     if @group
-      users = users.where('users.id IN (
-        SELECT user_id FROM group_users WHERE group_id = ?
-      )', @group.id)
+      users = users.joins("INNER JOIN group_users ON group_users.user_id = users.id")
+        .where("group_users.group_id = ?", @group.id)
     end
 
     unless @searching_user && @searching_user.staff?

GitHub sha: 63292cec