Skip to content

Commit

Permalink
Merge pull request #46 from Readify/upsert-user
Browse files Browse the repository at this point in the history
Create or Update User does not require `Name` for updates
  • Loading branch information
RobFaie authored May 28, 2020
2 parents 1ab18b3 + e820caa commit b80bfa0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions functions/Set-User.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Set-User {
$Email,

# The user's name.
[Parameter(Mandatory = $true,
[Parameter(Mandatory = $false,
ParameterSetName = 'Properties')]
[ValidateNotNullOrEmpty()]
[String]
Expand Down Expand Up @@ -195,12 +195,11 @@ function Set-User {

$path = '/api/v2/users/create_or_update.json'
$body = @{
user = @{
name = $Name
}
user = @{}
}

$map = @{
name = 'Name'
email = 'Email'
alias = 'Alias'
custom_role_id = 'CustomRoleId'
Expand Down

0 comments on commit b80bfa0

Please sign in to comment.