Powered by Adobe Commerce 2.4.9

icon_240x240.png

Username

PRODUCT:
0
TOTAL:

Trader Information

Back to top

Overview

Back to top

Mage2Expert Username is an extension for Magento 2 that adds a unique username field to every customer account and allows shoppers to sign in using either their email address or their username — no changes to core code required. When a customer logs in without an "@" symbol in the login field, the extension resolves the username to the correct email address server-side and passes it transparently to Magento's standard authentication pipeline. The result is a familiar, social-style login experience that works out of the box with the standard login form, REST API token requests, and AJAX login flows alike. Username uniqueness and format are enforced on every save — frontend registration, account edit, and admin — so data integrity is guaranteed at all times. Store owners who already have an existing customer base can use the built-in CLI command to automatically generate and assign usernames in bulk using any of four configurable   naming patterns, with full dry-run preview support before committing any changes. 

Features

  • Dual login — customers sign in with their email  address or username; both are accepted on the standard Magento login  form without any template changes to the core theme.
  • Username field on registration — a Username field  is injected into the Create Account form; it is required, unique, and  validated (3–50 characters; letters, numbers, underscores, dots, and  hyphens only) before the account is created.
  • Account edit — customers can update their  username at any time from the My Account → Account Information page,  subject to the same validation rules as registration.
  • Dashboard display — the customer's current  username is shown in the Account Information box on the My Account  dashboard, with a direct Change link to the edit form.
  • Admin customer grid column — a Username column is  automatically added to the Customers → All Customers grid; it is  visible, filterable, and searchable by default with no manual grid  configuration required.
  • Admin customer edit — admins can view and update a  customer's username directly in the Account Information tab of the  customer edit page; the same uniqueness and format validation applies.
  • CLI backfill commandmage2expert:username:generate  assigns usernames to all existing customers who do not yet have one,  using the generation pattern configured in the admin panel.
  • Four generation patterns — Email Prefix, First  Name + Customer ID, First Name + Last Name, and Custom Prefix + Customer  ID; the custom prefix is freely configurable.
  • Dry-run mode — preview every username that would  be generated without saving any changes, ideal for reviewing results  before committing to a large customer base.
  • Automatic uniqueness collision handling — the CLI command pre-loads all existing usernames and appends a numeric suffix (e.g. john_1, john_2) whenever a generated username is already taken.
  • Server-side validation on every save — required, length (3–50 chars), allowed character set ([a-zA-Z0-9_.\-]), and uniqueness are enforced via a plugin on every customer save, covering frontend, admin, and programmatic API calls.
  • Case-insensitive login and storage — usernames are stored in lowercase and resolved case-insensitively at login, so JohnDoe and johndoe are treated as the same username.
  • Master enable/disable switch — set Enable  Username Login to No in the admin to instantly revert to standard  email-only login without uninstalling the extension.
  • Per store-view configuration — all settings, including the enable switch and generation pattern, can be configured independently for each store view.
  • Zero core code modifications — all functionality  is implemented through Magento's official plugin (interceptor) and  layout XML mechanisms; no core files are overridden.
  • Magento 2.4.x compatible — tested on PHP 8.1, 8.2, 8.3, and 8.4 with Magento Open Source and Adobe Commerce.

Username Validation Rules

  • Required — the field cannot be left blank on any save.
  • Minimum length — 3 characters.
  • Maximum length — 50 characters.
  • Allowed characters — letters (a–z, A–Z), digits (0–9), underscores ( _ ), dots ( . ), and hyphens ( - ).
  • Uniqueness — no two customers may share the same username (case-insensitive).

CLI Bulk Username Generation

For stores with an existing customer base, the included CLI command backfills usernames without requiring any manual data entry. It reads the Generation Pattern setting from the admin configuration, processes customers in configurable batches (default 100 per page), and skips any customer who already has a username.

Technical Specifications

Back to top

Seller profile

Sukumar Gorai

Seller contact

E-mail

Current Version

1.0.0

Adobe Commerce platform compatibility

Adobe Commerce (cloud): 2.4 (current)

Adobe Commerce (on-prem): 2.4 (current)

Magento Open Source: 2.4 (current)

Type

Stable Build

Updated

23 June, 2026

Categories

Extensions, Content & Customizations

Documentation

User Guides

License Type

Open Software License 3.0 (OSL-3.0)

Policy

Privacy Policy

Quality Report

Back to top

Installation & Varnish Tests

Passed

Coding Standard

Passed

Plagiarism Check

Passed

Malware Check

Passed

Marketing Review

Passed

Manual Testing

Passed

All tests were conducted on the latest versions of Adobe Commerce that existed for the compatible release lines at the moment of the extension submission. Latest versions of all other software were used, as applicable.

Release Notes

Back to top

1.0.0:

  • Compatible with Adobe Commerce (cloud) : 2.4
  • Compatible with Adobe Commerce (on-prem) : 2.4
  • Compatible with Magento Open Source : 2.4
  • Stability: Stable Build
  • Description:

    Initial release — username EAV attribute, dual login (email/username), registration field, account edit, dashboard box, admin grid column, admin edit field, CLI backfill command with 4 generation patterns.

Support

Back to top

The best place to start if you need help with a specific extension is to contact the developer. All Adobe Commerce developers have both a contact email and a support email listed.

Contact Vendor

Q & A

Back to top

Reviews

Back to top