• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

API Quesiton: AccountWebService.DeleteAccount

C

chortle

Guest
Hi all,

I am writing code to automate the creation and destruction of sites. The documentation is quite weak on the deletion process. Does anyone know what exactly gets deleted when AccountWebService.DeleteAccount is called? Is the end user's account deleted? Is their site deleted?

Thanks,

Mike
 
During user account deletion all sites, plans, hosts will be deleted which belongs to this particular user. Better way is to test it. It should work fine...
 
the api reference gives the c# example function code

[C#]
public�ServiceDeleteResultOfAccountDeleteStatus[]�DeleteAccount(
���string[]�accountIds
);

Does anyone know the format of the function in PHP?
 
Using the GetAccountByName method

Hi, following up on the above post: I am building an API between WHMcs and Sitebuilder. I have automatic user/site creation working. Now I wish to delete a certain account.

However, I am receiving this error concerning the DeleteAccount method. Listed below this error message is the code where I am using that method.

Type: SoapFault
Message: Action has been failed. list of users is empty
Fault code: ERROR_ACTION_FAILED
Details: list of users is empty
File: /home/goodhost/public_html/billing3/includes/actionhooks.php
Line: 352
Code: 0

$struct = new stdClass();
$result = new stdClass();
$result2 = new stdClass();

print $vars["username"];

$accountService = $this->_getWebService('/AccountWebService.asmx?WSDL');

// first we must search to see if the username exists as a site in sitebuilder.

$struct->username = $vars["username"];

$result = $accountService->GetAccountByName(new SoapVar($struct, SOAP_ENC_OBJECT));

$accountId = $result->UserAccount->AccountId;

print "<p>";
print $accountId;

$delsite = new stdClass();

$delsite->UserAccount->AccountId = $accountId;

print "<p>2: ";
print $delsite->UserAccount->AccountId;

// delete that site (line 352)

$result2 = $accountService->DeleteAccount(new SoapVar($delsite, SOAP_ENC_OBJECT));

I have also tried using the method by supplying the hardcoded string "sitetest1" for example, and the same error message above is generated.

Can you tell me how I should be using the DeleteAccount API method to process correctly?

This is the page of documentation:

http://download1.parallels.com/SiteBuilder/4.1.0/doc/api/ref_manual/en_US/html/4.1/index.html

where it says the syntax is:

public�ServiceDeleteResultOfAccountDeleteStatus[]�DeleteAccount(
���string[]�accountIds
);
 
Back
Top