Skip to content

Commit

Permalink
Update PaperCut.ps1
Browse files Browse the repository at this point in the history
Fix Rename
msheldont4e authored Nov 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f7c0953 commit 997a62c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions PaperCut.ps1
Original file line number Diff line number Diff line change
@@ -454,7 +454,7 @@ function Idm-UsersRename {
#
# Execute function
#
$connection_params = ConvertFrom-Json2 $SystemParams
$system_params = ConvertFrom-Json2 $SystemParams
$function_params = ConvertFrom-Json2 $FunctionParams

$properties = $function_params.Clone()
@@ -471,21 +471,25 @@ function Idm-UsersRename {
</param>
<param>
<value>
<int>{1}</int>
<string>{1}</string>
</value>
</param>
<param>
<value>
<int>{2}</int>
<string>{2}</string>
</value>
</param>
</params>
</methodCall>' -f $system_params.authtoken, $properties.Username, $properties.NewUsername

Log info ("Renaming User ({0}) to ({1})" -f $properties.Username, $properties.NewUsername)

$response = Invoke-PaperCutRequest -SystemParams $system_params -FunctionParams $function_params -Body $xmlRequest

[PSCustomObject]@{
Log info ("Completed Rename for ({0}) to ({1})" -f $properties.Username, $properties.NewUsername)

# Out new object
[PSCustomObject]@{
Username = $properties.NewUsername
}
}

0 comments on commit 997a62c

Please sign in to comment.