Resellers - Edit a sub-account
Edit a sub-account
This function lets you edit a sub-account (note: only available for reseller accounts).
int Modif_Utilisateur($compte_mdworks, $quota_envoi, $pass_user, $login, $motdepasse)
$compte_mdworks
$quota_envoi: assigned sending quota, or false to leave unchanged
$pass_user: new user password, or false to leave unchanged
$login: login of the reseller account
$motdepasse: password of the reseller account
Warning:
The SOAP server for user management is separate from the regular API:
https://www.eml-srv.com/_soap/serveur.php
Description
Edit a sub-account.
$compte_mdworks is the MDWorks account identifier returned when creating the sub-account.
Parameters (required)
All parameters are required.
Return value
true or false
Error messages
No field must be left empty login
No field must be left empty motdepasse
Authentication error (invalid login / password)
No field must be left empty (MDWorks account identifier, credit, user password).
Unknown user: please select a user that exists
Access denied: this user does not appear to belong to you.
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('https://www.eml-srv.com/_soap/serveur.php'); // Remove the 's' from 'https' if CURL is not installed
$parametres = array( 'compte_mdworks'=>'431', 'quota_envoi'=>'500', 'pass_user'=>'new password', 'login'=>'your_login', 'motdepasse'=>'your_password' );
$variable=$client->call('Modif_Utilisateur', $parametres);
// Retrieve the error, if any
if($client->fault)
die("Error:Code: {$client->faultcode}"
. "Detail: {$client->faultactor}"
. "Solution: {$client->faultstring}");
print_r($variable); </source>
Which gives a result like:
true ``` <p>This number is the identifier of the new user.
### Example with PHP5
```php
try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/serveur.php", 'uri' => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1' ));
$variable = $client->Modif_Utilisateur('431','500','new password','your_login','your_password'); //or //$variable = $client->__soapCall(Modif_Utilisateur,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}