WHM postkillacct: where's the domain name?


Nov 18, 2011
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.


Technical Product Specialist
Nov 29, 2006
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).