File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
LoginAsCustomerFrontendUi/CustomerData Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function __construct(
46
46
public function beforeLogout (Auth $ subject ): void
47
47
{
48
48
$ user = $ subject ->getUser ();
49
- if ($ this ->config ->isEnabled () && $ user ) {
49
+ if ($ this ->config ->isEnabled () && $ user && $ user -> getIsLoggedAsCustomer () ) {
50
50
$ userId = (int )$ user ->getId ();
51
51
$ this ->deleteAuthenticationDataForUser ->execute ($ userId );
52
52
}
Original file line number Diff line number Diff line change 10
10
<default >
11
11
<login_as_customer >
12
12
<general >
13
- <enabled >0 </enabled >
13
+ <enabled >1 </enabled >
14
14
<store_view_manual_choice_enabled >0</store_view_manual_choice_enabled >
15
15
<authentication_data_expiration_time >60</authentication_data_expiration_time >
16
16
</general >
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function __construct(
49
49
*/
50
50
public function getSectionData (): array
51
51
{
52
- if (!$ this ->customerSession ->getCustomerId ()) {
52
+ if (!$ this ->customerSession ->getCustomerId () || ! $ this -> customerSession -> getLoggedAsCustomerAdmindId () ) {
53
53
return [];
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments