File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
app/code/Magento/CustomerGraphQl/Model/Context Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,14 @@ public function execute(ContextParametersInterface $contextParameters): ContextP
59
59
60
60
$ contextParameters ->addExtensionAttribute ('is_customer ' , $ this ->isCustomer ($ currentUserId , $ currentUserType ));
61
61
62
- if ($ this ->isCustomer ($ currentUserId , $ currentUserType )) {
63
- try {
64
- $ customerGroupId = $ this ->customerRepository ->getById ($ currentUserId )->getGroupId ();
65
- } catch (\Exception $ e ) {
66
- $ customerGroupId = GroupInterface::NOT_LOGGED_IN_ID ;
67
- }
68
-
69
- $ contextParameters ->addExtensionAttribute ('customer_group_id ' , $ customerGroupId );
62
+ try {
63
+ $ customerGroupId = $ this ->customerRepository ->getById ($ currentUserId )->getGroupId ();
64
+ } catch (\Exception $ e ) {
65
+ $ customerGroupId = GroupInterface::NOT_LOGGED_IN_ID ;
70
66
}
71
67
68
+ $ contextParameters ->addExtensionAttribute ('customer_group_id ' , $ customerGroupId );
69
+
72
70
return $ contextParameters ;
73
71
}
74
72
You can’t perform that action at this time.
0 commit comments