Username extension icon

Username for Magento 2

Let customers register and sign in with a username as well as their email address.

Customer & Support Magento 2.4.x Open Source & Adobe Commerce Adobe Marketplace approved $39 USD

Why choose Username?

Username adds a unique username to customer accounts and lets customers sign in with either their username or their email address. The username is resolved to the account email on the server, so the standard login form, AJAX login and REST token requests all keep working. Uniqueness and format rules are enforced at registration.

Username: Overview (screenshot 1 of 5)Username: Frontend (screenshot 2 of 5)Username: Admin (screenshot 3 of 5)Username: Configuration (screenshot 4 of 5)Username: Account (screenshot 5 of 5)
1 / 5

At a glance

Module nameMage2Expert_Username
Composer packagemage2expert/module-username
SettingsStores › Configuration › Magento Expert › Username Login (3 options)
Per store view settingsYes
APINo custom endpoints (uses Magento's standard APIs)
CLI commandsmage2expert:username:generate
PHP8.1, 8.2, 8.3, 8.4, 8.5

Installation

After purchasing on the Adobe Commerce Marketplace, install it with Composer using your Marketplace access keys:

composer require mage2expert/module-username
bin/magento module:enable Mage2Expert_Username
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Skip setup:di:compile and static-content:deploy if your store runs in developer mode.

Configuration reference

All 3 options under Stores › Configuration › Magento Expert › Username Login, grouped as they appear in the admin.

General Settings 1
SettingDescription
Enable Username Login 
Username Generation (CLI Command) 2
SettingDescription
Generation PatternPattern used when generating usernames for existing customers via CLI.
Custom PrefixUsed only when "Custom Prefix + ID" pattern is selected (e.g. "user_" produces user_123).

Developer reference

Command line

bin/magento mage2expert:username:generate

Frequently asked questions

How much does Username cost?
Username costs $39 USD as a one-off purchase on the Adobe Commerce Marketplace.
Which Magento and PHP versions are supported?
Magento Open Source and Adobe Commerce 2.4.x. It is developed and tested on Magento 2.4.8, and supports PHP 8.1, 8.2, 8.3, 8.4, 8.5.
Where do I configure Username?
In the Magento admin under Stores › Configuration › Magento Expert › Username Login. It has 3 options, grouped into 2 sections.
Can I switch it off without uninstalling it?
Yes. Set "Enable Username Login" to No under Stores › Configuration › Magento Expert › Username Login. Your settings and data are kept.
Can the settings differ per store view?
Yes. Many options can be set per website and store view, so multi-store and multi-language setups can behave differently.
Can it be customised for my store?
Yes. As the developer of Username, I can adapt it to your workflow or build related features. Email me with what you need.
Available for new projects

Have a Magento project in mind?

Tell me about your store and what you need. I reply to every enquiry within one business day.

Adobe Certified Expert

Adobe Commerce Developer certification, verified on Credly.

15+ years of Magento

From Magento 1 to Magento 2.4.x, Adobe Commerce and Hyvä.

62 Marketplace extensions

Each one reviewed and approved by Adobe.