• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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