Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

WHM postkillacct: where's the domain name?

Discussion in 'cPanel Developers' started by ansgarat, Nov 23, 2011.

  1. ansgarat

    ansgarat Registered

    Nov 18, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi, is there any way to get the domain name that's being terminated in postkillacct? I create some additional settings for the domains in postwwwacct and I need to remove them in postkillacct, but postkillacct doesn't pass the domain name in the arguments. Only the user name.

    This is for WHM 11.30. Thank you.
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Looking at the big picture, you may want to reconsider working with domains rather than usernames. Here's a few scenarios you need to be mindful of when dealing with domains:

    - People can have multiple domains on a single account
    - It's common for someone to unpark a domain, change the primary domain associated with an account and park the old primary domain on that same account after swapping primary domains.

    Admittedly, usernames can change too, but it's more common to change domains than change usernames.

    However, if you still want to go by domain name, I recommend using prekillacct instead of postkillacct. This will execute when the account still exists (but is in the process of being terminated) so you can still cross reference domains with usernames by other means (e.g. using the XML API to gather this information, though there is very likely to be alternatives that are equally reliable).

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice