[PR #4426] [CLOSED] fix(admin): admin plugin update renamed fields #30979

Closed
opened 2026-04-17 21:56:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4426
Author: @LaurinBoettcher
Created: 9/4/2025
Status: Closed

Base: canaryHead: fix/admin-plugin-renamed-fields


📝 Commits (3)

  • e954ba6 fix: admin plugin and renamed fields
  • fa4cc21 refactor code rabbit changes
  • e47e6f0 refactor linter

📊 Changes

2 files changed (+46 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/db/db.test.ts (+28 -0)
📝 packages/better-auth/src/db/get-tables.ts (+18 -1)

📄 Description

closes: 4408


Summary by cubic

Fixes admin plugin support for renamed user fields by mapping field aliases in getAuthTables. Ensures admin works with custom column names and keeps banned/banExpires fields available.

  • Bug Fixes
    • Map options.user.fields aliases onto user field configs when building tables.
    • Add tests covering custom email, role, and banReason mappings and presence of banned/banExpires.

🔄 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/4426 **Author:** [@LaurinBoettcher](https://github.com/LaurinBoettcher) **Created:** 9/4/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/admin-plugin-renamed-fields` --- ### 📝 Commits (3) - [`e954ba6`](https://github.com/better-auth/better-auth/commit/e954ba650e00da8e83946809217f606bd0c05102) fix: admin plugin and renamed fields - [`fa4cc21`](https://github.com/better-auth/better-auth/commit/fa4cc21397be264a1ea562215d4f55c6d672d5a8) refactor code rabbit changes - [`e47e6f0`](https://github.com/better-auth/better-auth/commit/e47e6f094cd6ac6f221c1f3b035b6c66a3323918) refactor linter ### 📊 Changes **2 files changed** (+46 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/db.test.ts` (+28 -0) 📝 `packages/better-auth/src/db/get-tables.ts` (+18 -1) </details> ### 📄 Description closes: [4408](https://github.com/better-auth/better-auth/issues/4408) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes admin plugin support for renamed user fields by mapping field aliases in getAuthTables. Ensures admin works with custom column names and keeps banned/banExpires fields available. - **Bug Fixes** - Map options.user.fields aliases onto user field configs when building tables. - Add tests covering custom email, role, and banReason mappings and presence of banned/banExpires. <!-- 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-17 21:56:52 -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#30979