Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    4

    Default find user by addon domain

    Hi,

    Is it possible via the WHM API to find a username if you know an add-on domain in the account?

    Thanks,
    Brad

  2. #2
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    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.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    4

    Default

    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

  4. #4
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    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

  5. #5
    Registered User
    Join Date
    Sep 2010
    Posts
    4

    Default Re: find user by addon domain

    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

  6. #6
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: find user by addon domain

    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

  7. #7
    Registered User
    Join Date
    Sep 2010
    Posts
    4

    Default Re: find user by addon domain

    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

Similar Threads & Tags
Similar threads

  1. enabled allow user addon domain, but still not working.
    By doridori in forum New User Questions
    Replies: 4
    Last Post: 01-01-2009, 12:58 PM
  2. Unable to find out which user owns the parked domain
    By Webfreak in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-15-2007, 09:42 AM
  3. User can`t remove addon domain!!??
    By x-man in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 01-04-2006, 09:06 AM
  4. How do I get the user associated to an addon domain?
    By kosmo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-04-2003, 05:15 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube