Skip to content

Commit

Permalink
Merge pull request #167 from magento/magento/magento2-login-as-custom…
Browse files Browse the repository at this point in the history
…er#144

magento/magento2-login-as-customer#144: "Login as Customer" functionality should be enabled by default.
  • Loading branch information
naydav authored Jun 16, 2020
2 parents a86d2d6 + 62d0a29 commit 050d0d6
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 050d0d6

Please sign in to comment.