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.

xml-api - Reseller

Discussion in 'cPanel Developers' started by eugui, Dec 13, 2007.

  1. eugui

    eugui Member

    Joined:
    Dec 10, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Marília, SP, Brazil
    Hi,

    I want to know how i suspend a reseller account and all accounts owned by reseller. If i use "suspend an account" at reseller account all accounts owned by reseller will access normal!!!

    sorry for my bad english

    Thanks

    Guilherme
     
  2. deieno

    deieno Well-Known Member

    Joined:
    Nov 16, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Floripa - Brazil
    Hi Guilherme,
    I would like to know that too.
    Have you already found?

    Without xml-api I created long time ago, it's something like this:

    Suspend:
    /scripts/suspendreseller?reseller=${usuario}&resalso=1

    Unsuspend:
    /scripts/suspendreseller?reseller=${usuario}&resalso=1&un=1

    But the problem on that is that the result is html. Would be nice the xml feature on the suspendreseller too
     
  3. eugui

    eugui Member

    Joined:
    Dec 10, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Marília, SP, Brazil
    Hi deieno,

    Now i know how i suspend a reseller account. At my code i get all reseller accounts using resellerstats and i put the result at a vector and then i use "for" at vector to get the account login and whith login i suspend an account.

    for example:

    $vector = whmResellerStats($ip, $login, $key, $resellerlogin);

    $total = sizeof($vector);

    $reason = "Spam";

    for($i=0;$i<sizeof($vector);$i++)
    {
    $login = $vector['resellerstats']['result'][0]['accts'][$i]['user'];
    $susp = whmSuspendAccount($ip, $login, $key, $login, $reason);
    }


    sorry for my bad english

    []´z


    *** Post em brasileiro

    Não tinha visto que voce era brasileiro cara...hehehehe...bom, primeiro eu utilizo a funcao "resellerstats" para pegar todo o "historico" de um reseller e armazenar em um vetor, conto o total de contas que a revenda possui, faço um "for" para percorrer o vetor, nessa repetição eu pego o login de cada conta e com posse do login eu faço a suspenso como se fosse uma conta normal!!

    []´z
     
    #3 eugui, Mar 28, 2008
    Last edited: Mar 28, 2008
Loading...

Share This Page