AccountWebService.UpdateAccount Method 

Updates account information

[C#]
public void UpdateAccount(
   string accountId,
   string newUsername,
   string newPassword,
   string newEmail,
   string newFirstName,
   string newLastName,
   AccountRoles newRole,
   string newPlanId,
   bool newChangePasswordAllowed
);

Parameters

accountId
ID of account to be updated.
newUsername
New login (if null or empty string, login will not be changed).
newPassword
New password (if null, password will not be changed).
newEmail
New account owner's e-mail address.
newFirstName
New account owner's first name.
newLastName
New account owner's last name.
newRole
New account role.
newPlanId
ID of a new plan (if ID is '{00000000-0000-0000-0000-000000000000}' or empty string or null, the plan will not be changed).
newChangePasswordAllowed
Permission to change password.

Remarks

Note: Sitebuilder for Linux/Unix implementation of this method doesn't allow to change the account role to Administrator.

Example SOAP 1.1

Request
POST /sbw_trunk/ServiceFacade/4.5/AccountWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/webservices/sb/4.5/AccountService/UpdateAccount"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <CredentialsSoapHeader xmlns="http://swsoft.com/webservices/sb/4.5/AccountService">
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <UpdateAccount xmlns="http://swsoft.com/webservices/sb/4.5/AccountService">
      <accountId>string</accountId>
      <newUsername>string</newUsername>
      <newPassword>string</newPassword>
      <newEmail>string</newEmail>
      <newFirstName>string</newFirstName>
      <newLastName>string</newLastName>
      <newRole>Administrator or Reseller or SiteOwner</newRole>
      <newPlanId>string</newPlanId>
      <newChangePasswordAllowed>boolean</newChangePasswordAllowed>
    </UpdateAccount>
  </soap:Body>
</soap:Envelope>
Response
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UpdateAccountResponse xmlns="http://swsoft.com/webservices/sb/4.5/AccountService" />
  </soap:Body>
</soap:Envelope>

See Also

AccountWebService Web Service | Web services