Skip to main content
The user object contains information about logged-in customers when the login/account feature is enabled in your store. It’s used to create account management functionality and personalized experiences.
Usage: Available globally when shop.login_active is true - check login status and display account-related content

Basic Usage

The user object helps you create login/logout functionality and personalized content:

Available Properties

Conditional Content Examples

Personalized Header

Checkout Experience

Complete Examples

Responsive Account Menu

Mobile-Friendly Account Section

Implementation Notes

Feature Check

Always wrap user object usage with {{#shop.login_active}} to ensure the feature is enabled

Login URL

The user.login_url leads to the same page for both login and account management

Logout Handling

Logout is typically handled via /logout endpoint, not through the login_url

State Management

Use {{#user.logged_in}} and {{^user.logged_in}} for clear conditional logic

Best Practices

Accessible Login Forms

Next Steps

Settings Object

Learn about theme-specific customizable settings

Basket Object

Work with shopping cart data and functionality

Order Object

Display order information on thank you pages

Shop Object

Back to shop settings and global store information