Skip to content

Commit

Permalink
added files
Browse files Browse the repository at this point in the history
  • Loading branch information
gaokevin1 committed Oct 22, 2024
1 parent f1c2b42 commit d756800
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/SDK/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ private function transformEmptyArraysToObjects($data)
if (is_array($data)) {
foreach ($data as &$value) {
if (is_array($value)) {
// If the array is empty, ensure it's preserved as an empty array
if (empty($value)) {
$value = new \stdClass();
$value = [];
} else {
// Recur for non-empty arrays
$value = $this->transformEmptyArraysToObjects($value);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/SDK/Management/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,7 @@ public function composeCreateBody(
'additionalLoginIds' => $additionalLoginIds,
'ssoAppIds' => $ssoAppIds,
];

if ($password !== null) {
if (isset($password->cleartext)) {
$res['password'] = $password->cleartext;
Expand All @@ -1284,7 +1285,7 @@ public function composeCreateBody(
}
}
}

return $res;
}

Expand Down

0 comments on commit d756800

Please sign in to comment.