Skip to content

Commit 76c4198

Browse files
committed
magento-commerce/magento2-login-as-customer#171: Force customer unlogin during admin loglout without additional MySQL queries
1 parent 8dc6b6f commit 76c4198

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(
4646
public function beforeLogout(Auth $subject): void
4747
{
4848
$user = $subject->getUser();
49-
if ($this->config->isEnabled() && $user && $user->getIsLoggedAsCustomer()) {
49+
if ($this->config->isEnabled() && $user) {
5050
$userId = (int)$user->getId();
5151
$this->deleteAuthenticationDataForUser->execute($userId);
5252
}

app/code/Magento/LoginAsCustomer/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<default>
1111
<login_as_customer>
1212
<general>
13-
<enabled>1</enabled>
13+
<enabled>0</enabled>
1414
<store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
1515
<authentication_data_expiration_time>60</authentication_data_expiration_time>
1616
</general>

0 commit comments

Comments
 (0)