update_sambauser()
Update a network drive user.
Signature
update_sambauser(array $parameters): mixedParameters
Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.
| Name | Description | Requirement |
|---|---|---|
samba_login |
The login | Required |
samba_path |
The path | Optional |
samba_new_password |
The new password | Optional |
samba_comment |
The new comment | Optional |
PHP example
<?php
// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
'samba_login' => 's0123456',
'samba_path' => 'samba-path',
'samba_new_password' => 'new_password',
'samba_comment' => 'new comment',
];
try {
$client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
$response = $client->KasApi(json_encode([
'kas_login' => 'w0123456',
'kas_auth_type' => 'session',
'kas_auth_data' => $sessionToken,
'kas_action' => 'update_sambauser',
'KasRequestParams' => $parameters,
]));
print_r($response);
} catch (SoapFault $fault) {
echo 'Error: ' . $fault->faultstring;
}
Responses and error codes
-
TRUEthe action was carried out -
missing_parametera required parameter is missing -
in_progressthe KAS object is currently being processed -
nothing_to_donothing was changed -
password_syntax_incorrect -
path_syntax_incorrect -
samba_comment_syntax_incorrect -
samba_login_not_found -
samba_login_syntax_incorrect