Skip to content

Commit

Permalink
magento/magento2-login-as-customer#144: "Login as Customer" functiona…
Browse files Browse the repository at this point in the history
…lity should be enabled by default.
  • Loading branch information
engcom-Foxtrot committed Jun 15, 2020
1 parent a86d2d6 commit 62d0a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
*/
public function beforeLogout(Auth $subject): void
{
if ($this->config->isEnabled()) {
if ($this->config->isEnabled() && $subject->getUser()) {
$userId = (int)$subject->getUser()->getId();
$this->deleteAuthenticationDataForUser->execute($userId);
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/LoginAsCustomer/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<default>
<login_as_customer>
<general>
<enabled>0</enabled>
<enabled>1</enabled>
<store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
<authentication_data_expiration_time>60</authentication_data_expiration_time>
</general>
Expand Down

0 comments on commit 62d0a29

Please sign in to comment.