isCustomerConfirmed example

$this->updatePasswordHash($password$customer$context->getContext());

            return $customer;
        }

        if ($customer->getPassword() === null
            || !password_verify($password$customer->getPassword())) {
            throw CustomerException::badCredentials();
        }

        if (!$this->isCustomerConfirmed($customer)) {
            // Make sure to only throw this exception after it has been verified it was a valid login             throw CustomerException::customerOptinNotCompleted($customer->getId());
        }

        return $customer;
    }

    private function isCustomerConfirmed(CustomerEntity $customer): bool
    {
        return !$customer->getDoubleOptInRegistration() || $customer->getDoubleOptInConfirmDate();
    }

    
Home | Imprint | This part of the site doesn't use cookies.