Skip to content

Commit 8ced67b

Browse files
gweinjcjworkmanjc
andauthored
Update scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1
Co-authored-by: Joe Workman <54448601+jworkmanjc@users.noreply.github.com>
1 parent 9743c78 commit 8ced67b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/automation/Radius/Functions/Private/Get-WebJCUser.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ function get-webjcuser {
1515
$response = Invoke-RestMethod -Uri "https://console.jumpcloud.com/api/systemusers/$userID" -Method GET -Headers $headers
1616
$userObj = [PSCustomObject]@{
1717
# If the localUserAccount field is set, use that for username, otherwise use JC username
18-
username = $(if ($response.systemUsername -eq "") { $response.username } else { $response.systemUsername })
18+
username = $(if ([string]::IsNullOrEmpty($response.systemUsername)) { $response.username } else { $response.systemUsername })
19+
1920
id = $response._id
2021
email = $response.email
2122
}

0 commit comments

Comments
 (0)