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.

xmlapi create account owned by reseller

Discussion in 'cPanel Developers' started by kjg, Feb 22, 2014.

  1. kjg

    kjg Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Hi
    We are using the xmlapi since many, many years to to various things and it works fine. Thank you very much for that class.

    We have now started using resellers in WHM for internal admin purposes including shared IP handling.

    So we need to be able to set reseller when creating the new account.
    We use createaccount, but cant find any info regarding reseller there (except setting the account as reseller itself).

    There are actually 2 parts of this:
    1) set reseller as owner for the created account
    2) set reseller shared IP as IP for the account

    We would prefer not having to use different plans for each reseller, but if that is the only way to solve this, we will clone all packages to each reseller.

    Any suggestion/idea/comment would be very much appreciated

    //kjg
     
  2. kjg

    kjg Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Ok, no answers to this one so I did the following (if anyone else needs to do the same):
    1) createacct to create the account as usual
    2) modifyacct to set reseller as owner
    3) setsiteip to set the resellers shared IP to the account

    Since setsiteip works but all parts of WHM data is not updated, I'll start a new thread about that one since it is not only directed to this.

    Should anyone find out a way to do this directly via createacct or similar, please reply to this thread.

    // kjg
     
  3. kjg

    kjg Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Update/Solved:

    Changing the order will make it work:
    1) createacct to create the account as usual
    2) setsiteip to set the resellers shared IP on the domain
    3) modifyacct to set reseller as owner for the account

    Guess it is because modifyacct runs postmodifyacct after it is ready but I am not sure.
    The important part is that it works.

    // kjg
     
Loading...

Share This Page