Jump to content

server module terminate


festr

Recommended Posts

Hi

 

I cannot figure out how to trigger terminate function (TerminateAccount) if I delete a product within admin area (delete from some client). Is that supposed to work or the terminate function is not executed on this action?

Link to comment
Share on other sites

Which module are you using? Just deleting a product itself from WHMCS would not terminate it on the server, just, it'll delete from WHMCS. In future hit the 'Terminate' button in the products area of WHMCS before deleting it.

 

If you want to terminate the account now you would need to login to WHM (assuming you're running cPanel but if not, the equal to WHM) and go to 'Terminate an Account'.

Link to comment
Share on other sites

I have coded my own module. It would be nice if whmcs can trigger server module terminate function when deleting it in whmcs area so accounts will not leave accounts on server. lets say that I need to terminate multiple accounts - I have to click on terminate button one by one and then delete it.

Link to comment
Share on other sites

I have coded my own module. It would be nice if whmcs can trigger server module terminate function when deleting it in whmcs area so accounts will not leave accounts on server. lets say that I need to terminate multiple accounts - I have to click on terminate button one by one and then delete it.

 

Think you will need an extension/hook added as deleting products from WHMCS does work as it is designed to and that is just deleting the records from WHMCS, not the server itself.

Edited by Alex - Arvixe
Link to comment
Share on other sites

You could write a hook, that would run right before the service (client product) is deleted:

 

http://docs.whmcs.com/Hooks:ServiceDelete

 

Within the hook, just have it make an API call to Terminate the service:

 

http://docs.whmcs.com/API:Module_Terminate

 

This should execute a terminate, before deleting the service. If you only want this to happen for a specific module, you would have to put logic in your hook to only run the terminate, if the service is using the specific module. Otherwise, this will run for every server provisioning module you have.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated