From 3d1ea0d1a0716b609a99888e457a10775700dddc Mon Sep 17 00:00:00 2001 From: Sergey Zinchenko Date: Mon, 22 Oct 2018 15:40:43 +0300 Subject: [PATCH] Fix using of by_user_id --- src/Services/Users/AddEventService.php | 4 ++-- src/Services/Users/SetPropertiesService.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Services/Users/AddEventService.php b/src/Services/Users/AddEventService.php index a1b1a91..4d253fb 100644 --- a/src/Services/Users/AddEventService.php +++ b/src/Services/Users/AddEventService.php @@ -185,8 +185,8 @@ protected function prepareParams(): array if (($createdAt = $this->getCreatedAt()) !== null) { $result['created'] = $createdAt; } - if (($userId = $this->getUserId()) !== null) { - $result['by_user_id'] = $userId; + if ($this->isByUserId()) { + $result['by_user_id'] = true; } return $result; diff --git a/src/Services/Users/SetPropertiesService.php b/src/Services/Users/SetPropertiesService.php index 71f261e..c3e97b7 100644 --- a/src/Services/Users/SetPropertiesService.php +++ b/src/Services/Users/SetPropertiesService.php @@ -54,8 +54,8 @@ protected function getParams(): array $result = ['operations' => json_encode(array_map(function (IProperty $item) { return $item->toArray(); }, $this->getProperties()))]; - if (($userId = $this->getUserId()) !== null) { - $result['by_user_id'] = $userId; + if ($this->isByUserId()) { + $result['by_user_id'] = true; } return $result;