LogoTanStarter Docs
LogoTanStarter Docs
HomepageIntroductionCodebaseGetting StartedEnvironments
Configuration
Deployment

Integrations

CloudflareDatabaseAuthenticationEmailNewsletterStoragePaymentNotificationsAnalyticsChatboxAffiliates

Customization

MetadataPagesLanding PageBlogComponentsUser ManagementAPI Key Management

Codebase

Project StructureFormatting & LintingEditor SetupUpdating the Codebase
X (Twitter)

User Management

Learn how to manage users in the TanStarter template

This guide covers the user management system in the TanStarter template, including user roles, permissions, and administrative actions.

Core Features

The TanStarter template includes a user management system with the following features:

  • User search and filtering
  • Pagination with customizable page size
  • User role and account status management
  • User ban/unban functionality

User Management Interface

The user management interface is accessible through the dashboard (for admins only by default), and shows all users in the system.

The user table includes the following features:

  • Column Visibility: Toggle which columns are displayed using the columns dropdown
  • Search and Filtering: Use the search bar to find users by name or email
  • Pagination: Navigate through user records with customizable page sizes (10, 20, 30, 40, 50)

User Management Table

User Roles and Permissions

TanStarter template supports two user roles by default: admin and user.

You can create a new role by following the instructions in the Roles | BetterAuth documentation.

You can also add permissions to the roles to control what actions users can perform by following the instructions in the Permissions | BetterAuth documentation.

Setting Up an Admin User

To set up an admin user:

  1. Access your database using Drizzle Studio

  2. Navigate to the user table

  3. Find the user you want to make an admin

  4. Update the role field to admin

  5. Save the changes, and the user will now have administrative privileges

User Ban Management

Banning a User

To ban a user:

  1. Click on the user's name in the user table to open the details
  2. In the ban section:
    • Enter a reason for the ban
    • Optionally set an expiration date
    • Click the Ban User button

The user will be immediately banned and unable to log in.

Unbanning a User

To unban a user:

  1. Click on the user's name in the user table
  2. In the user details, click the Unban User button

The user's ban will be lifted immediately.

Next Steps

Now that you understand user management in TanStarter, explore these related topics:

Authentication

Configure user authentication

Website Configuration

Configure core website settings

Database

Configure database

Metadata

Configure metadata and language support

Table of Contents

Core Features
User Management Interface
User Roles and Permissions
Setting Up an Admin User
User Ban Management
Banning a User
Unbanning a User
Next Steps