Skip to content

Commit 20e9730

Browse files
author
Valeriy Nayda
committed
GraphQL-54: [Mutations] My Account: Change Password
1 parent 73404e3 commit 20e9730

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/Customer/Account/ChangePassword.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public function resolve(
6262
array $value = null,
6363
array $args = null
6464
) {
65-
$customerId = (int)$this->userContext->getUserId();
65+
$customerId = $this->userContext->getUserId();
6666

67-
if ($customerId === 0) {
67+
if ($customerId === 0 || $customerId === null) {
6868
throw new GraphQlAuthorizationException(
6969
__(
7070
'Current customer does not have access to the resource "%1"',

0 commit comments

Comments
 (0)