Add protected dir user

				
					StructOperationResponse WebHostingProtectedDirUpdate(string $IDsession, string $id, string $action, array $params)
				
			

Add a new user to the protected directory.

REQUIRED

  • idSession string (32)
    Session ID.
  • id string
    Hosting ID.
  • action string
    Set to “AddUser”.
  • params array
    {“fqdn”: fqdn of the vhost,

    “pathSecured”: Path of the protected directory,

    “username”: name of the new user,

    “password”: password of the new user,}

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $params = array("fqdn" => "wordpress.netim.com",
         "pathSecured" => "/protected",
         "username" => "Testuser",
         "password" => "12abCD%@",
        );
 
    $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); 
    $clientSOAP->WebHostingProtectedDirUpdate($idSession, "NW1024", "AddUser", $params)); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}