Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/UserManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function getUserByExternalId($externalId)
* @param string|null $passwordHashType The algorithm originally used to hash the password. Valid values are `bcrypt`, `ssha`, and `firebase-scrypt`.
* @param string|null $externalId The user's external ID.
* @param array<string, string>|null $metadata The user's metadata.
* @param string|null $email The email address of the user.
*
* @throws Exception\WorkOSException
*
Expand All @@ -125,7 +126,8 @@ public function updateUser(
$passwordHash = null,
$passwordHashType = null,
$externalId = null,
$metadata = null
$metadata = null,
$email = null
) {
$path = "user_management/users/{$userId}";

Expand All @@ -137,7 +139,8 @@ public function updateUser(
"password_hash" => $passwordHash,
"password_hash_type" => $passwordHashType,
"external_id" => $externalId,
"metadata" => $metadata
"metadata" => $metadata,
"email" => $email
];

$response = Client::request(Client::METHOD_PUT, $path, null, $params, true);
Expand Down
3 changes: 2 additions & 1 deletion tests/WorkOS/UserManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public function testUpdateUser()
"password_hash" => null,
"password_hash_type" => null,
"external_id" => null,
"metadata" => null
"metadata" => null,
"email" => null
];

$this->mockRequest(
Expand Down