ole1986 / wp-ispconfig3

Wordpress ISPConfig plugin with Gutenberg support
https://wordpress.org/plugins/wp-ispconfig3/
28 stars 13 forks source link

MachineITSvcs: Adding Update Client Function UpdClient() and change mail function to wp_mail #15

Closed ole1986 closed 5 years ago

ole1986 commented 5 years ago

Adding Update Client Function UpdClient() and change mail function to wp_mail

ole1986 commented 5 years ago

I like the idea of your shortcode to cancel and lock the client account. But honestly, we may think of a more global usage.

So better we provide such shortcode with attributes "lock=true canceled=false" for instance. The user can then decide to only disable the account or fully lock access.

Also, the method "UpdClient" would be better "UpdateClient" in future.

I will keep the changes provided by you like they are and we can (in future) amend this.

Thank you again.

MachineITSvcs commented 5 years ago

No problem. My thought process was that they could indeed pass the locked and canceled options in the shortcode, and would just have to provide those options in the additional PHP script they make. However, as a default, the UpdClient function assumes that you are just updating the client, like you would if changing the master template, and by default reactivating it as well in case it were previously disabled, unless the options were passed to do something else, like the Cancelled PHP script. In this case the locked and canceled options are set to “y” prior to the merge, negating the default “n” options that would be necessary if a client were to reinitiate payments after a cancellation or something similar. By providing the default options, you save the user from having to declare them any time they wish to update and/or reactivate a user account, which happens more frequently than a cancellation. As for the UpdClient vs UpdateClient, I was simply trying to keep the name brief when I added it several months ago, but we can definitely update it!

Collin Machine

On Feb 16, 2019, at 4:16 PM, ole notifications@github.com wrote: