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(
6161 array $ value = null ,
6262 array $ args = null
6363 ): Value {
64- if ((!$ context ->getUserId ()) || $ context ->getUserType () == UserContextInterface::USER_TYPE_GUEST ) {
64+
65+ $ customerId = (int ) $ this ->userContext ->getUserId ();
66+
67+ if ($ customerId === 0 ) {
6568 throw new GraphQlAuthorizationException (
6669 __ (
6770 'Current customer does not have access to the resource "%1" ' ,
6871 [\Magento \Customer \Model \Customer::ENTITY ]
6972 )
7073 );
7174 }
72- $ customerId = $ context ->getUserId ();
7375
7476 $ result = function () use ($ customerId ) {
7577 return $ this ->customerTokenService ->revokeCustomerAccessToken ($ customerId );
You can’t perform that action at this time.
0 commit comments