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;