We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    To fix this issue, we need to create ‘controller.php’ file at the below location.

    appcodeMagemonkeysCustomerControllerIndex

    <?php
    Namespace MagemonkeysCustomerControllerIndex;
    
    class Controller extends MagentoFrameworkAppActionAction
    {
    
    protected $customer;
    
    protected $customerFactory;
    
    public function __construct(
        MagentoCustomerModelCustomer $customer
        MagentoCustomerModelResourceModelCustomerFactory $customerFactory
    )
    {
        $this->customer = $customer;
        $this->customerFactory = $customerFactory;
    }
    
    public function execute()
    {
    
        $custom = $this->_customerFactory ->create();
        $custom = $custom->setWebsiteId($helperData->getWebsiteId());
        $custom = $custom->loadByEmail("jayesh@webtechsystem.com");
        $custom->setCustomAttributeCode(custom attribute value);   
    
      // Main code to resolve this issue.
        $customerData = $custom->getDataModel();
        $customerData->setCustomAttribute('custom_attribute_code', 'custom attribute value');
        $custom->updateData($customerData);
    
        $custom->save();
    }
    }

     

    field_5bfb909c5ccae

      Get a Free Quote