From 95b5c59db26bd7f43c5b05793f84cf3e5ecea178 Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Sat, 18 Feb 2023 15:43:20 +0800 Subject: [PATCH] Fix customer user not being associated with customer record #730 --- src/Controller/CustomerAppAPI/CustomerController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Controller/CustomerAppAPI/CustomerController.php b/src/Controller/CustomerAppAPI/CustomerController.php index b59da4e8..82675b90 100644 --- a/src/Controller/CustomerAppAPI/CustomerController.php +++ b/src/Controller/CustomerAppAPI/CustomerController.php @@ -108,6 +108,11 @@ class CustomerController extends ApiController ->setEmail($req->request->get('email', '')) ->setConfirmed($this->session->isConfirmed()); + // if customer user isn't set, set it now + if ($cust->getCustomerUser() == null) { + $cust->setCustomerUser($this->session->getCustomerUser()); + } + // update mobile phone of customer $cust->setPhoneMobile(substr($this->session->getPhoneNumber(), 2));