We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a86d2d6 + 62d0a29 commit 050d0d6Copy full SHA for 050d0d6
app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -45,7 +45,7 @@ public function __construct(
45
*/
46
public function beforeLogout(Auth $subject): void
47
{
48
- if ($this->config->isEnabled()) {
+ if ($this->config->isEnabled() && $subject->getUser()) {
49
$userId = (int)$subject->getUser()->getId();
50
$this->deleteAuthenticationDataForUser->execute($userId);
51
}
app/code/Magento/LoginAsCustomer/etc/config.xml
@@ -10,7 +10,7 @@
10
<default>
11
<login_as_customer>
12
<general>
13
- <enabled>0</enabled>
+ <enabled>1</enabled>
14
<store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
15
<authentication_data_expiration_time>60</authentication_data_expiration_time>
16
</general>
0 commit comments