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 contentBasic Usage
The user object helps you create login/logout functionality and personalized content:Available Properties
Conditional Content Examples
Personalized Header
Account Dashboard Link
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 enabledLogin URL
The
user.login_url leads to the same page for both login and account managementLogout Handling
Logout is typically handled via
/logout endpoint, not through the login_urlState Management
Use
{{#user.logged_in}} and {{^user.logged_in}} for clear conditional logicBest Practices
Accessible Login Forms
SEO-Friendly Account Links
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