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.

Call restoreaccount function

Discussion in 'cPanel Developers' started by danielati, Jan 23, 2012.

  1. danielati

    danielati Active Member

    Joined:
    Nov 7, 2011
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Hello everybody,

    I am trying make a restoreaccount by xmlapi. But I'm trying call the function and I can't.
    I did something like that:
    '$xmlapi->api1_query('user', 'RestoreAccount', 'restoreaccount', array('daily', '1', '1', '1', '1', '1') );'

    Someone can help me?

    Thanks a lot
     
  2. Brian

    Brian Well-Known Member

    Joined:
    Dec 1, 2010
    Messages:
    117
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    The code you've posted will not work as there is no such API1 or API2 function "RestoreAccount::restoreaccount". In essence, the code you've posted is referencing a non-existent function.

    The restore account API related function is the restoreaccount XML-API function.

    RestoreAccount (XML-API)

    It does not appear that this XML-API function has been specifically included into the latest XML-API PHP release, but you could call it as such in the interim:

    Code:
    $vars = array(
        'api.version' => 1,
        'user'        => 'jim',
        'type'        => 'daily',
        'all'         => 1,
        'ip'          => 0,
        'mail'        => 1,
        'mysql'       => 1,
        'subs'        => 1
    );
    $xmlapi->xmlapi_query('restoreaccount', $vars);
    
     
Loading...

Share This Page