Magento Customer Accounts — Registration, Dashboard and Account Management
In this tutorial, you'll learn Magento customer account management: registration workflow, account dashboard features, address book, wishlist, newsletter subscriptions, password management, and security configuration settings.
What You'll Learn
- The customer registration workflow and account confirmation Process
- Navigating the My Account dashboard (info, addresses, orders, wishlist)
- Managing the address book with default billing and shipping addresses
- Creating and sharing wishlists with other customers
- Configuring newsletter subscriptions and managing email preferences
- Handling password reset requests and account security settings
- Configuring customer account options in admin
Why It Matters
Every e-commerce site depends on registered customers. A smooth registration flow increases conversion rates. A well-organized account dashboard reduces support tickets. Proper address book and wishlist management encourages repeat purchases. Account security prevents fraud and builds trust. Understanding how customer accounts work end to end lets you configure, extend, and troubleshoot this critical subsystem.
Real-World Use
A fashion retailer with 50,000 registered customers processes 200 new registrations per day. Users update their addresses before holiday shipping, reset forgotten passwords, share wishlists with family members, and subscribe to newsletters for sale alerts. The admin team must configure CAPTCHA to block bot registrations, set password rules for security, and manage account confirmation emails. A Magento developer who understands the customer account system can customize each step and integrate with a CRM.
Learning Path
flowchart LR A["Sales Rules & Coupons"] --> B["Customer Accounts
You are here"]:::current B --> C["Customer Groups"] C --> D["Store Configuration"] classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px
Registration Workflow
When a new customer clicks "Create an Account" (at /customer/account/create/), Magento walks them through a structured registration process. Let's walk through every step from the shopper's perspective, then from the admin's perspective.
The Registration Form
The registration form collects four essential pieces of information:
- First Name and Last Name — used in order and email personalization
- Email — the unique identifier for the account
- Password — must meet the configured password policy
Magento also offers optional fields like Sign Up for Newsletter and, depending on configuration, a Subscribe to Newsletter checkbox.
From the developer's view, this form is rendered by the template at vendor/magento/module-customer/view/frontend/templates/form/register.phtml. The data is processed by Magento\Customer\Controller\Account\CreatePost.
Account Confirmation
By default a new account is active immediately. However you can require email confirmation:
- Go to Stores > Configuration > Customers > Customer Configuration.
- Under Create New Account Options, set Enable Autocomplete on Login/Register Forms.
- Set Require Emails Confirmation to Yes.
When confirmation is required, the customer receives an email with a confirmation link. They cannot log in until they click it. This prevents bots from creating fake accounts.
You can also choose whether to send a welcome email after registration:
Magento > Configuration > Customers > Customer Configuration
> Create New Account Options
> Default Welcome Email: General (or your custom template)
> Require Emails Confirmation: No
> Confirmation Link Email: Confirmation link email template
> Welcome Email: General
The email templates themselves are stored in vendor/magento/module-customer/view/frontend/email/ and can be overridden in your theme.
My Account Dashboard
After logging in, the customer lands at /customer/account/. This is the dashboard. Let's explore each section.
Account Information
The customer can view and edit their personal details:
- Name and email address
- Change password (requires current password)
- Newsletter subscription status
To change the password:
Navigate to: My Account > Account Information
Current Password: [enter current]
New Password: [enter new password]
Confirm New Password: [re-enter]
Save
Magento validates the current password before accepting the change. If the new password does not meet policy rules, the form shows an error.
Address Book
The address book is one of the most-used features. Customers enter their shipping and billing addresses once and reuse them across orders.
Each customer can have multiple addresses. They designate one as default billing address and one as default shipping address. These defaults are pre-selected during checkout.
Address fields include:
First Name, Last Name
Company (optional)
Street Address (two lines available)
City
State/Province (dropdown or text field)
ZIP/Postal Code
Country (dropdown)
Phone Number
VAT Number (optional, used for tax calculation)
Adding a new address:
My Account > Address Book > Add New Address
Fill in:
First Name: Jane
Last Name: Smith
Street Address: 123 Main Street
City: Portland
State: Oregon
ZIP: 97201
Country: United States
Phone: 503-555-0123
Check: Use as my default billing address
Check: Use as my default shipping address
Save
The address book is stored in the customer_address_entity database table with each attribute in a flat column (not EAV like products). You can access addresses programmatically:
// In a block or helper class
$customer = $this->customerSession->getCustomer();
$addresses = $customer->getAddresses();
foreach ($addresses as $address) {
echo $address->getStreetLine(1);
echo $address->getCity();
echo $address->getRegion();
echo $address->getCountryId();
echo $address->getPostcode();
}
My Orders
This section shows the customer's order history. Each row displays:
- Order number
- Date
- Ship to name
- Order total
- Status
- Action links (View, Reorder)
Clicking View shows the full order detail including items, prices, shipping, payment, and status history.
The order history grid is implemented by Magento\Sales\Block\Order\History.
My Wishlist
The wishlist lets customers save products for later. Each customer has one wishlist by default. They can:
- Add items from product pages
- Remove items
- Add all items to cart
- Share the wishlist by email
To add a product to the wishlist from a product page, PHP handles this through the Magento\Wishlist\Controller\Index\Add controller.
Sharing a wishlist:
My Account > My Wishlist > Share Wishlist
Enter email addresses (comma-separated)
Add a personal message
Submit
The recipient receives an email with links to each wishlist item. This is a powerful social selling feature.
Newsletter Management
Customers subscribe and unsubscribe to newsletters from their account dashboard:
My Account > Newsletter Subscriptions
General Subscription: [checked/unchecked]
Save
When a customer subscribes, Magento sends a confirmation email if double opt-in is enabled. This is configured at:
Stores > Configuration > Customers > Newsletter
> General Options
> Need to Confirm: Yes
Double opt-in helps comply with GDPR and CAN-SPAM regulations.
Billing Agreements
For payment methods that support billing agreements (like PayPal), customers can manage their agreements here. A billing agreement allows the merchant to charge the customer's account without re-entering payment details for future purchases.
Password Management
Password management is a critical part of customer accounts. Let's examine the complete flow.
Forgot Password Flow
When a customer clicks "Forgot Your Password?":
- They enter their email on the form at
/customer/account/forgotpassword/. - Magento looks up the customer by email.
- If found, it generates a unique password reset token and stores it in the
customer_entitytable with an expiration timestamp. - An email is sent with a reset link containing the token.
- The customer clicks the link, which takes them to
/customer/account/createPassword/with the token and customer ID as parameters. - They enter a new password and confirm it.
- The token is validated (not expired, not already used). If valid, the password is updated and the token is cleared.
The reset token parameters:
Token lifetime: 2 hours (configurable)
Token length: 32 characters (random, stored as SHA256 hash)
Password Policy Configuration
Configure password rules at:
Stores > Configuration > Customers > Customer Configuration
> Password Options
> Password Reset Protection Type: By IP and Email
> Max Number of Password Reset Requests: 5
> Min Time Between Password Reset Requests: 10 minutes
> Forgot Email Template: Password Reset template
> Recovery Link Expiration Period: 2 hours
The password reset protection prevents brute-force attacks on the forgot-password form.
Account Security
CAPTCHA
Magento supports CAPTCHA for registration, login, and password reset forms.
Stores > Configuration > Customers > Customer Configuration
> CAPTCHA
> Enable CAPTCHA on Storefront: Yes
> Font: LinLibertine (or other)
> Forms: Register, Login, Forgot Password
> Displaying Mode: After number of attempts to login
> Number of Unsuccessful Attempts to Login: 3
> CAPTCHA Timeout: 5 minutes
> Number of Symbols: 4-5
> Case Sensitive: No
For headless or API-based stores, consider using reCAPTCHA instead (available in Magento 2.4+).
Max Login Attempts
Lockout protection prevents brute-force login attacks:
Stores > Configuration > Customers > Customer Configuration
> Login
> Max Number of Login Failures to Lockout Account: 6
> Lockout Time (minutes): 30
When a customer exceeds the failure limit, their account is locked for the configured duration. They cannot log in even with the correct password until the lockout expires.
Account Information Edit Security
When a customer edits their email address, Magento can require them to confirm the change by entering their password:
Stores > Configuration > Customers > Customer Configuration
> Create New Account Options
> Require Password to Change Email: Yes
This prevents account takeover via email change if someone gains temporary access to an authenticated session.
Account Configuration Reference
All customer account settings live in Stores > Configuration > Customers. Let's list the key sections:
Create New Account Options:
| Setting | Description |
|---|---|
| Enable Autocomplete | Suggests saved passwords in browser |
| Default Welcome Email | Which email template to send |
| Require Emails Confirmation | Forces email verification before login |
| Confirmation Link Email | Template for confirmation email |
| Welcome Email | Template sent after confirmation |
| Require Password to Change Email | Password needed to change email |
| VAT Number Visibility | Show/hide VAT field during registration |
Password Options:
| Setting | Description |
|---|---|
| Password Reset Protection Type | By IP, by email, or both |
| Max Number of Password Reset Requests | Limit per time period |
| Min Time Between Reset Requests | Cooldown period |
| Forgot Email Template | Which template to use |
| Recovery Link Expiration Period | How long the reset link works |
Account Scope:
Customer account configuration can be set at website or global scope. Most settings are website-scoped, meaning each website in a multi-store setup can have different password policies and registration settings.
Common Mistakes
Not enabling email confirmation. Without email confirmation, anyone can create accounts with fake email addresses. This leads to spam accounts, wasted storage, and skewed analytics. Always enable confirmation for customer-facing sites.
Setting password rules too strict. Requiring 20-character passwords with three special characters frustrates customers and increases abandoned registrations. Balance security with usability. Magento's default minimum of 8 characters with mixed case and one digit works well.
Leaving CAPTCHA disabled. Without CAPTCHA, bots can create thousands of accounts and try to brute-force passwords. Enable CAPTCHA on login, registration, and forgot password forms.
Using the default email templates without customization. The default welcome email contains generic Magento wording. Customize email templates with your brand voice, store name, and useful links. This increases engagement.
Not configuring lockout settings. Without lockout protection, an attacker can try unlimited password combinations. Set a reasonable failure limit (e.g., 6 attempts) and lockout duration (e.g., 30 minutes).
Practice Questions
What happens when a customer requests a password reset? Answer: Magento generates a unique random token, stores it (hashed) in the customer record with a 2-hour expiration, sends an email with a reset link containing the token, and when the customer submits a new password, validates the token before updating the password.
How does the address book associate addresses with orders? Answer: Each address stored in the address book has a unique
customer_address_id. When an order is placed, Magento copies the selected address data into thesales_order_addresstable, linking it to the order but also keeping a reference to the original address ID for future use.What is double opt-in for newsletters and how do you enable it? Answer: Double opt-in requires the subscriber to confirm their subscription by clicking a link in a confirmation email before they are added to the list. Enable it at Stores > Configuration > Customers > Newsletter > Need to Confirm = Yes.
Challenge: Extend the customer registration form to include a "Phone Number" field that is required during registration. Create a custom module that adds the phone field to the register form, validates it, saves it to the customer entity, and displays it on the My Account information page. Use a setup patch to add the attribute, a plugin to validate the form, and a template modification to render the field.
FAQ
Mini Project
Your task: Build a complete customer account configuration for an online electronics store that sells in the United States and Canada.
Configure account settings:
- Enable email confirmation for new registrations
- Set CAPTCHA on registration and login forms (display after 3 failed attempts)
- Set max 5 login failures before 15-minute lockout
- Set password policy: minimum 10 characters, at least 1 uppercase, 1 number
- Enable double opt-in for newsletter subscriptions
- Require password to change email address
Create three test accounts:
- Account A: Full address in the US with default billing and shipping
- Account B: Address in Canada with default shipping
- Account C: No address, subscribed to newsletter
For Account A:
- Add two products to the wishlist
- Share the wishlist via email
- Place two sample orders (can use the Magento sample data products)
- Verify orders appear in My Orders
Test the password reset flow for Account B.
Export the customer list and verify all three accounts appear.
Write a PHP script to programmatically create a new customer with MySQL compatibility in mind, setting all address fields and the newsletter subscription status.
This exercise teaches you every facet of customer account management in Magento.
What's Next
Now that you understand customer accounts, learn how to group customers for targeted pricing and promotions:
Continue to Lesson 16: Customer Groups — Group pricing, tier pricing, and customer segmentation.
Related lessons:
- Sales Rules and Coupons — Coupon rules for specific customer groups
- Orders, Invoices and Shipments — Processing orders for registered customers
- Cart and Checkout — How account address book speeds up checkout
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro