[PR #5083] [CLOSED] feat(admin): search by multiple fields #5761

Closed
opened 2026-03-13 12:34:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5083
Author: @jslno
Created: 10/4/2025
Status: Closed

Base: canaryHead: feat-admin/search-multiple-fields


📝 Commits (6)

  • 3b991a1 feat(admin): search by multiple fields
  • 513eccd fix: correctly fallback empty array
  • 4baf7c3 Merge branch 'canary' into feat-admin/search-multiple-fields
  • 5290323 Merge branch 'canary' into feat-admin/search-multiple-fields
  • 234cdbe chore: resolve conflicts
  • 2432a6b fix: types

📊 Changes

2 files changed (+49 additions, -6 deletions)

View changed files

📝 packages/better-auth/src/plugins/admin/admin.test.ts (+26 -0)
📝 packages/better-auth/src/plugins/admin/routes.ts (+23 -6)

📄 Description

Tests will pass when better-call is bumped


Summary by cubic

Adds multi-field user search to admin.listUsers, allowing searches across email and name with OR logic for better matches.

  • New Features
    • searchField accepts a string or array; defaults to ["email"].
    • Builds OR filters per field using one operator (default: contains) and value.
    • Added tests for searching by name and email.

Written for commit 2432a6ba10. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5083 **Author:** [@jslno](https://github.com/jslno) **Created:** 10/4/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat-admin/search-multiple-fields` --- ### 📝 Commits (6) - [`3b991a1`](https://github.com/better-auth/better-auth/commit/3b991a199728eb561c19f28a3800690c364b7918) feat(admin): search by multiple fields - [`513eccd`](https://github.com/better-auth/better-auth/commit/513eccdeb667377c0afd2b68104cdd2dc873433d) fix: correctly fallback empty array - [`4baf7c3`](https://github.com/better-auth/better-auth/commit/4baf7c3435619656a7c9839694b833387688f8e8) Merge branch 'canary' into feat-admin/search-multiple-fields - [`5290323`](https://github.com/better-auth/better-auth/commit/5290323f0c3a4f3d079ec2399d876a1981f416a6) Merge branch 'canary' into feat-admin/search-multiple-fields - [`234cdbe`](https://github.com/better-auth/better-auth/commit/234cdbe3887b934fae3e00747383dc2298913037) chore: resolve conflicts - [`2432a6b`](https://github.com/better-auth/better-auth/commit/2432a6ba10251a6a0119d99e1b6605d3181fab1b) fix: types ### 📊 Changes **2 files changed** (+49 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+26 -0) 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+23 -6) </details> ### 📄 Description Tests will pass when `better-call` is bumped <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds multi-field user search to admin.listUsers, allowing searches across email and name with OR logic for better matches. - **New Features** - searchField accepts a string or array; defaults to ["email"]. - Builds OR filters per field using one operator (default: contains) and value. - Added tests for searching by name and email. <sup>Written for commit 2432a6ba10251a6a0119d99e1b6605d3181fab1b. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:34:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5761