From 0e6f66554ef0775e5b69ac260e074946b0a1783d Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 15 Jul 2022 13:39:32 +0200 Subject: [PATCH] use order user for remark instead of current session user --- src/Application/Controller/Admin/AdminOrder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application/Controller/Admin/AdminOrder.php b/src/Application/Controller/Admin/AdminOrder.php index 287b0e5..de588f9 100644 --- a/src/Application/Controller/Admin/AdminOrder.php +++ b/src/Application/Controller/Admin/AdminOrder.php @@ -73,7 +73,7 @@ class AdminOrder extends AdminController { $messageBody = Registry::getRequest()->getRequestEscapedParameter('messagebody'); - if (strlen($messageBody) <= 1) { + if (false === is_string($messageBody) || strlen($messageBody) <= 1) { Registry::getUtilsView()->addErrorToDisplay( Registry::getLang()->translateString('D3LM_EXC_MESSAGE_NO_LENGTH') ); @@ -115,7 +115,7 @@ class AdminOrder extends AdminController $remark = oxNew(Remark::class); $remark->assign([ 'oxtype' => AdminUser::REMARK_IDENT, - 'oxparentid' => $this->order->getUser()->getId(), + 'oxparentid' => $this->order->getOrderUser()->getId(), 'oxtext' => $recipients.PHP_EOL.$messageBody ]); $remark->save();