File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/code/Magento/CustomerGraphQl/Model/Resolver/Customer/Account Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,17 @@ public function resolve(
61
61
array $ value = null ,
62
62
array $ args = null
63
63
): Value {
64
- if ((!$ context ->getUserId ()) || $ context ->getUserType () == UserContextInterface::USER_TYPE_GUEST ) {
64
+
65
+ $ customerId = (int ) $ this ->userContext ->getUserId ();
66
+
67
+ if ($ customerId === 0 ) {
65
68
throw new GraphQlAuthorizationException (
66
69
__ (
67
70
'Current customer does not have access to the resource "%1" ' ,
68
71
[\Magento \Customer \Model \Customer::ENTITY ]
69
72
)
70
73
);
71
74
}
72
- $ customerId = $ context ->getUserId ();
73
75
74
76
$ result = function () use ($ customerId ) {
75
77
return $ this ->customerTokenService ->revokeCustomerAccessToken ($ customerId );
You can’t perform that action at this time.
0 commit comments