cycli icon indicating copy to clipboard operation
cycli copied to clipboard

Add remove user feature

Open Maliek opened this issue 6 years ago • 1 comments

Hi,

Can't resist coding 😉 Any feedback welcome!

Maliek avatar Apr 16 '18 17:04 Maliek

Thank you for working on this, I am looking forward to adding more community contributions! And you are first 🥇

I think this operation should work on the basis of the user object, for consistency with everything else, not primarily the user ID. IOW between

Get-CyUserList | where email -eq 'johndoe@somewhere' | Remove-CyUser

there should not be a requirement for a step like

Get-CyUserList | where email -eq '[email protected]' | foreach-object { Remove-CyUser -ByUserId $_.user_id }

The spirit of the module should be to make the API very Powershell-like and human discoverable in terms of verbs, operating on pipelines of objects, etc. So I think this needs to be revised to support operating on object pipeline for users and delete by email. Delete by ID is not a good scenario because the ID is not typically available, unless you jump through hoops like in the example above.

jan-tee avatar May 09 '18 14:05 jan-tee