API ISPConfig: How to update a Client

Discussion in 'Developers' Forum' started by aairedes, Sep 4, 2014.

  1. aairedes

    aairedes New Member

    Hello, i want to update the data of a client in ISPConfig width the API. But i can't work it.

    Mi code is:

    $client = new SoapClient(null, array('location' => $soap_location,'uri' => $soap_uri, 'trace' => 1, 'exceptions' => 1));

    $session_id = 0;

    try {
    if($session_id = $client->login($username,$password)) {
    $client_record = $client->client_get_by_username($session_id, $userCliente);
    if (isset($client_record["client_id"])) {
    $c_id = $client_record["userid"];
    $client_record["city"] = "ZZZ";
    $affected_rows = $client->client_update($session_id, $c_id, $reseller_id, $client_record);
    catch(Exception $e){
    echo "ERROR";

    How i can update o change the information of the client? This code do anything.

    Thank you.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    you can find an exampl on how to use the client_update function in the romote_client/examples/ directory inside the ispconfig tar.gz file.

Share This Page