howto use set command with api and php

Hi !

I would like to modify user information with API in user-manager.
I’m not able to send the following command

/tool user-manager user set admin add-credit=2h

or

/tool user-manager user set admin comment=testadmin

Can someone provide help using php?
Other examples are welcome.

Regards
Tom

first you should see id of that user , on next set what you want .

$API->write(‘/tool/user-manager/user/set’,false);
$API->write(‘=.id=userID’,false);
$API->write(‘=comment=main comment’);

you may also try ‘=.id=admin’ (i.e. username as id)