From a6a843633726540eabdb4e301479969e8756b1b6 Mon Sep 17 00:00:00 2001 From: Vallabh Kansagara Date: Mon, 11 Mar 2024 18:06:21 +0530 Subject: [PATCH] fix unset of user_id --- src/Mapper/UserHydrator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mapper/UserHydrator.php b/src/Mapper/UserHydrator.php index 0305306..5d14765 100644 --- a/src/Mapper/UserHydrator.php +++ b/src/Mapper/UserHydrator.php @@ -61,7 +61,9 @@ public function hydrate(array $data, $object) throw new Exception\InvalidArgumentException('$object must be an instance of LmcUser\Entity\UserInterface'); } + if (isset($data['user_id'])) { $data = $this->mapField('user_id', 'id', $data); + } return $this->hydrator->hydrate($data, $object); }