Creating Web Users

The add operation is used to create a web user on the certain site. You can specify the web user settings on creation or set them later. By default, new web user account will be created in accordance with preferences set by Plesk Administrator. For information on web user settings and preferences, refer to the Web User Settings and Preferences section.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet adding a new web user includes the add operation node:

<packet>
<webuser >
   <add>
   ...
   </add>
</webuser>
</packet>

 

The add node is presented by type WebUserAddInputType (webuser.xsd), and its graphical representation is as follows:

Note: The login name should begin with an alphabet character. It cannot contain white spaces. The password cannot contain quotation marks, white space, user's login name, and should be between 5 and 14 characters in length.

Note: The password field can be left blank. If so, the web user is created but cannot login until the administrator creates the password for this user.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Remarks

You can add multiple users in a single packet. Use as many add operations as the number of web users to be added.

 

Response Packet Structure

The add node of the output XML packet is presented by type WebUserAddOutputType (webuser.xsd) and structured as follows:

 

Samples

Adding a web user

The request packet adding a new web user called myWebAccount looks as follows:

<packet>
<webuser>
<add>
   <site-id>12</site-id>
   <login>myWebAccount</login>
</add>
</webuser>
</packet>

Response:

<packet>
<webuser>
<add>

<result>
   <status>ok</status>
   <id>321</id>
</result>

</add>
</webuser>
</packet>

 

If the site was not found on the server, the response can look as follows:

<packet>
<webuser>
<add>

<result>
   <status>error</status>
   <errcode>1015</errcode>
   <errtext>Domain does not exist</errtext>
</result>

</add>
</webuser>
</packet>