[PR #5991] [CLOSED] feat(admin): implement multi-field search with customizable search mode #23267

Closed
opened 2026-04-15 21:35:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5991
Author: @Yasser5711
Created: 11/14/2025
Status: Closed

Base: canaryHead: admin-list-users-multi-field-search


📝 Commits (1)

  • 07ad83f feat(admin): implement multi-field search with customizable search mode

📊 Changes

3 files changed (+155 additions, -5 deletions)

View changed files

📝 docs/content/docs/plugins/admin.mdx (+11 -0)
📝 packages/better-auth/src/plugins/admin/admin.test.ts (+102 -0)
📝 packages/better-auth/src/plugins/admin/admin.ts (+42 -5)

📄 Description

https://github.com/better-auth/better-auth/issues/5990

Summary by cubic

Implemented multi-field search in admin.listUsers with a configurable OR/AND mode to improve user discovery across multiple fields.

  • New Features
    • Added searchInFields to search across multiple fields when searchField is not provided; accepts an array or a comma-separated string.
    • Added searchMode with "OR" (default) or "AND" to combine matches across fields.
    • Defaults: fields ["email"] and operator "contains".
    • Updated docs and added tests covering OR default and AND behavior.

Written for commit 07ad83fa1f. 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/5991 **Author:** [@Yasser5711](https://github.com/Yasser5711) **Created:** 11/14/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `admin-list-users-multi-field-search` --- ### 📝 Commits (1) - [`07ad83f`](https://github.com/better-auth/better-auth/commit/07ad83fa1f4510f920f515c237ce78a68ec6beec) feat(admin): implement multi-field search with customizable search mode ### 📊 Changes **3 files changed** (+155 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/admin.mdx` (+11 -0) 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+102 -0) 📝 `packages/better-auth/src/plugins/admin/admin.ts` (+42 -5) </details> ### 📄 Description https://github.com/better-auth/better-auth/issues/5990 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Implemented multi-field search in admin.listUsers with a configurable OR/AND mode to improve user discovery across multiple fields. - **New Features** - Added searchInFields to search across multiple fields when searchField is not provided; accepts an array or a comma-separated string. - Added searchMode with "OR" (default) or "AND" to combine matches across fields. - Defaults: fields ["email"] and operator "contains". - Updated docs and added tests covering OR default and AND behavior. <sup>Written for commit 07ad83fa1f4510f920f515c237ce78a68ec6beec. 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-04-15 21:35:09 -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#23267