cycli
cycli copied to clipboard
Add remove user feature
Hi,
Can't resist coding 😉 Any feedback welcome!
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.