Hi,
Is it possible via the WHM API to find a username if you know an add-on domain in the account?
Thanks,
Brad
Hi,
Is it possible via the WHM API to find a username if you know an add-on domain in the account?
Thanks,
Brad
I think the call you are looking for is the /xml-api/domainuserdata call which you pass a domain and it returns various information about a domain (including the owner).
This is called in the following fashion:
/xml-api/domainuserdata?domain=$domain
I did discover a bug with this in the 11.27.x release of cpanel that caused this functionality not to work with addon domains, but that is being addressed currently.
Yes, that's exactly what I'm looking for. I guess the bug is why I asked the question. How long do you think it would take your team to fix a bug like this? And will it be fixed in 11.26.x cPanel too?
Thanks,
Brad
Hi Brad,
The bug has already been fixed and tests as of 11.27.70. You will find the correct behavior in 11.28. The fix will not be backmerged into 11.26. I do not have an ETA for 11.28; IMHO it will be available in the CURRENT tier very soon (in units of weeks). If you absolutely needed it now, you can find it in NIGHTLY (11.27.74 at the moment), however NIGHTLY is dangerously bleeding-edge and should never be used in a production environment.
Regards,
-DavidN
David Neimeyer
Integration Developer
sdk.cpanel.net
APIs: XML-API API1 & API2
Check Out: Developer Downloads Integration Blog
Need Support? Support Ticket Developer Forum Feature Request
Hi,
It works for me now after the upgrade. Thanks. Though I did notice if I search for the www. version of a domain, it will show the "Obtained userdata." status message, but the data inside the userdata tag is empty.
Thanks,
Brad
Hi Brad,
I believe the issue is that "www.mydomain.net" is a ServerAlias (in Apache conf) for "mydomain.net" and the function will only look for domains and subdomains (ServerName) for which there is a corresponding cPanel account (owner).
Were you able to pass "www.mydomain.net" in an eariler version of cPanel?
Regards,
-DavidN
David Neimeyer
Integration Developer
sdk.cpanel.net
APIs: XML-API API1 & API2
Check Out: Developer Downloads Integration Blog
Need Support? Support Ticket Developer Forum Feature Request
Hi David,
I guess that may be it. I haven't used the command before cpanel 11.27.x, so I don't know if it did work previously. I guess I can just do some preprocessing and strip the subdomain from the hostname before the api call.
Thanks,
Brad