fruitcake / magento2-alwaysloginascustomer
Magento2 Always allow admin to login as customer
Package info
github.com/fruitcake/magento2-alwaysloginascustomer
Type:magento2-module
pkg:composer/fruitcake/magento2-alwaysloginascustomer
Fund package maintenance!
Requires
- php: ^7.3 || ^8.0
- magento/framework: ^103.0
- magento/module-backend: ^102.0
- magento/module-customer: ^103.0
- magento/module-login-as-customer: ^100.4
- magento/module-login-as-customer-admin-ui: ^100.4
- magento/module-login-as-customer-api: ^100.4
- magento/module-login-as-customer-assistance: ^100.4
- magento/module-store: ^101.0
- magento/module-ui: ^101.0
Requires (Dev)
- magento/magento-coding-standard: *
- phpunit/phpunit: ^9.6 || ^10.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-10 11:27:12 UTC
README
Magento 2.4 has a feature called 'Login as Customer', which gives Admin users the ability to start a session as that user. This module enables this feature, regardless of the 'Allow remote shopping assistance' Customer setting.
Requirements
- Magento 2.4 or later (Login as Customer was added in 2.4.0)
- PHP 7.3 or later
Install
composer require fruitcake/magento2-alwaysloginascustomer
php bin/magento module:enable Fruitcake_AlwaysLoginAsCustomer
php bin/magento setup:upgrade
Usage
By default, when the customer hasn't given permissions you will get this warning:
The user has not enabled the "Allow remote shopping assistance" functionality. Contact the customer to discuss this user configuration.
This module ignores the setting and will allow Login as Customer, regardless of the configuration.
NOTE: It is up to you to explain this to the customer and make sure admins follow the correct protocols
What the module changes:
- Login as Customer is allowed for every customer, whatever their "Allow remote shopping assistance" setting.
- The "Allow remote shopping assistance" checkbox is hidden on the storefront registration and account edit forms (Luma and Hyvä). The customer's stored preference is left as it is.
- A "Login as customer" button is added to the admin customer grid. When "Store View To Login In" is set to
manual selection, the popup lets the admin pick the store; otherwise the customer's own store is used.
The button is only shown when Login as Customer is enabled and the admin has the
Magento_LoginAsCustomer::loginpermission.
Development
Dependencies come from the Mage-OS mirror, so no repo.magento.com keys are needed.
composer install
composer test # PHPUnit unit tests
composer cs # Magento2 coding standard