[GH-ISSUE #609] Feature: Disable a user on Users table via API #8339

Closed
opened 2026-04-13 03:24:38 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @sajadmh on GitHub (Nov 21, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/609

Is your feature request related to a problem? Please describe.

Add a way to suspend users. The Account is allowed to login, but the User is suspended, disabled or archived by an admin.

Describe the solution you'd like

Add a formal isDisabled (or isSuspended or isArchived) field to later suspend a user from accessing the app (via access controls etc.).

Extend the API to disable the via the User table, e.g. like await auth.api.removeMember() we can have await auth.api.disableUser() (or suspendUser() or archiveUser()).

Originally created by @sajadmh on GitHub (Nov 21, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/609 **Is your feature request related to a problem? Please describe.** Add a way to suspend users. The `Account` is allowed to login, but the `User` is suspended, disabled or archived by an admin. **Describe the solution you'd like** Add a formal `isDisabled` (or `isSuspended` or `isArchived`) field to later suspend a user from accessing the app (via access controls etc.). Extend the API to disable the via the `User` table, e.g. like `await auth.api.removeMember()` we can have `await auth.api.disableUser()` (or `suspendUser()` or `archiveUser()`).
GiteaMirror added the locked label 2026-04-13 03:24:38 -05:00
Author
Owner

@Kaseax commented on GitHub (Dec 1, 2024):

Is this not already a feature within the admin plugin? check the ban user section in the docs, this will prevent users to log in.

<!-- gh-comment-id:2509743083 --> @Kaseax commented on GitHub (Dec 1, 2024): Is this not already a feature within the admin plugin? check the [ban user section ](https://www.better-auth.com/docs/plugins/admin#ban-user)in the docs, this will prevent users to log in.
Author
Owner

@ttsirkia commented on GitHub (Dec 7, 2024):

I think there is a semantical difference if the account is banned or kind of soft deleted although still storing the user information.

<!-- gh-comment-id:2525314685 --> @ttsirkia commented on GitHub (Dec 7, 2024): I think there is a semantical difference if the account is banned or kind of soft deleted although still storing the user information.
Author
Owner

@Bekacru commented on GitHub (Jan 13, 2025):

this can be done using hooks and additional fields.

<!-- gh-comment-id:2586215033 --> @Bekacru commented on GitHub (Jan 13, 2025): this can be done using hooks and additional fields.
Author
Owner

@maelp commented on GitHub (Sep 5, 2025):

@Bekacru sure it can be done "manually" but it's so common that it would be nice if it were added out-of-the-box

<!-- gh-comment-id:3257565633 --> @maelp commented on GitHub (Sep 5, 2025): @Bekacru sure it can be done "manually" but it's so common that it would be nice if it were added out-of-the-box
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8339