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.

Getting Reseller Info

Discussion in 'cPanel Developers' started by magixman, Jan 4, 2009.

  1. magixman

    magixman Member

    Joined:
    Sep 28, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is there any tag that can be used in a cpanel plugin that will get me the name of the reseller. What I am trying to do is to allow the reseller to configure a plugin for the reseller's users. If I could get the user name of the reseller I could store configuration settings in a directory in the reseller's account. Any other ideas are welcome
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Assuming you mean cPanel Plug-in and not WHM plug-in, I'm not aware of any API1/API2 function that provides that information.

    However, you could use the XML-API's listaccts function to determine the owner of an account. You can find documentation for this at:

    http://www.cpanel.net/plugins/xmlapi/listaccts.html
     
  3. magixman

    magixman Member

    Joined:
    Sep 28, 2002
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks David.

    Yes I mean a cPanel plugin (e.g. a phplive script in the frontend directory pointed to by a cpanelplugin file that was installed on the server).

    I thought that the XML API was only available if you were logged into to WHM which would not be the case for a cPanel plugin.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Unlike API1/API2 that relies on the environment to essentially do the authentication for you (transparently when you're within a cPanel theme), as scripts that use the XML API explicitly authenticate into the server, they can be executed anywhere. For example, you can create a CGI/Perl script or PHP script that resides within a cPanel theme that authenticates into the XML API. Just be careful with the security ramifications of doing so (as you're now performing those actions as a reseller, not just as an end-user).
     
Loading...

Share This Page