[PR #3540] [CLOSED] fix(organization): resolve slug when setting active organization #13122

Closed
opened 2026-04-13 08:46:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3540
Author: @tinkerer-shubh
Created: 7/22/2025
Status: Closed

Base: mainHead: fix-org-membership-slug


📝 Commits (3)

  • 16ba3fa fix: resolve organization slug when setting active organization
  • ea5a29f lint
  • 856e7a3 fix(organization): treat null on either id or slug as unset when setting active org

📊 Changes

1 file changed (+30 additions, -16 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+30 -16)

📄 Description

closes https://github.com/better-auth/better-auth/issues/3528


Summary by cubic

Fixed an issue where setting the active organization did not resolve organization slugs correctly. Now, both organization IDs and slugs are properly handled when updating the active organization.


🔄 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/3540 **Author:** [@tinkerer-shubh](https://github.com/tinkerer-shubh) **Created:** 7/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-org-membership-slug` --- ### 📝 Commits (3) - [`16ba3fa`](https://github.com/better-auth/better-auth/commit/16ba3fa7f989425e639e2d59919a9d1e1dff588d) fix: resolve organization slug when setting active organization - [`ea5a29f`](https://github.com/better-auth/better-auth/commit/ea5a29f5a6053dab42288402f8b5dd892f1818dd) lint - [`856e7a3`](https://github.com/better-auth/better-auth/commit/856e7a319ae3eaff16f7a0ac6f556810fa824134) fix(organization): treat null on either id or slug as unset when setting active org ### 📊 Changes **1 file changed** (+30 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+30 -16) </details> ### 📄 Description closes https://github.com/better-auth/better-auth/issues/3528 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixed an issue where setting the active organization did not resolve organization slugs correctly. Now, both organization IDs and slugs are properly handled when updating the active organization. <!-- 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-13 08:46:02 -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#13122