I´ve extended the RemoteBridge with the update user/domain function.
This is NOT an official release.
Feel free to test it and give feedback only here in this threat.
action = 'update'
you can use all settings from 'create'
exception:
if admin_pass is empty, the password for this user will not be changed.
if you want to change the password, you have to set the new password in admin_pass
here is the sample:
- function dataEncryption($dataToEncrypt, $ResellerUsername) { return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($ResellerUsername), serialize($dataToEncrypt), MCRYPT_MODE_CBC, md5(md5($ResellerUsername)))), '+/=', '-_,');}$bridgeKey = 'mYbRiDgEkEy';$ResellerUsername = 'res1';$dataToEncrypt = array( 'action' => 'update', 'reseller_username' => $ResellerUsername, 'reseller_password' => 'yxcvb123', 'bridge_key' => $bridgeKey, 'hosting_plan' => 'myhostingplan', 'email' => 'info@mydomain.com', 'fname' => 'Micky', 'lname' => 'Mouse', 'firm' => 'Disney Inc.', 'zip' => '23456', 'domain' => 'mydomain.de', 'admin_pass' => 'abc123');$ch = curl_init('http://admin.server.example.com/remotebridge.php');curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, 'key='.$bridgeKey.'&data='.dataEncryption($dataToEncrypt, $ResellerUsername));curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$httpResponse = curl_exec($ch);echo $httpResponse;curl_close($ch);
If you want to test it with Git stable, please change version in imscp.conf to something > 1.1.2 (as soon as you are finished testing, change it back to Git stable)
and use http://admin.server.example.com:8080/remotebridge.php as curl_init URL
UPDATE:
- add: get list of all users from a reseller
result looks like this:
new action: get_user
I´ve updated the file to latest version.