The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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