|
|
@@ -397,15 +397,6 @@ return 'success';
|
|
|
*/
|
|
|
function zimbraSingle_SuspendAccount($params)
|
|
|
{
|
|
|
-// Debug
|
|
|
-logModuleCall(
|
|
|
- 'zimbrasingle',
|
|
|
- __FUNCTION__,
|
|
|
- $whmcs,
|
|
|
- "Debug",
|
|
|
- $params
|
|
|
-);
|
|
|
-//
|
|
|
$api = new Zm_Auth($params['serverip'], $params['serverusername'], $params['serverpassword'], "admin");
|
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
|
@@ -448,7 +439,15 @@ logModuleCall(
|
|
|
*/
|
|
|
function zimbraSingle_UnsuspendAccount($params)
|
|
|
{
|
|
|
- $accountName = $params['customfields']['username'] . '@' . $params['customfields']['maildomain'];
|
|
|
+// Debug
|
|
|
+logModuleCall(
|
|
|
+ 'zimbrasingle',
|
|
|
+ __FUNCTION__,
|
|
|
+ $whmcs,
|
|
|
+ "Debug",
|
|
|
+ $params
|
|
|
+);
|
|
|
+//
|
|
|
$api = new Zm_Auth($params['serverip'], $params['serverusername'], $params['serverpassword'], "admin");
|
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
|
@@ -462,16 +461,16 @@ function zimbraSingle_UnsuspendAccount($params)
|
|
|
return $login->getMessage();
|
|
|
}
|
|
|
$apiAccountManager = new Zm_Account($api);
|
|
|
- $response = $apiAccountManager->setAccountStatus($accountName, "active");
|
|
|
+ $response = $apiAccountManager->setAccountStatus($params['username'], "active");
|
|
|
if(is_a($response, "Exception")) {
|
|
|
logModuleCall(
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$params,
|
|
|
- "Error: account $accountName could not unlocked",
|
|
|
+ "Error: account " . $params['username'] . " could not unlocked",
|
|
|
$response
|
|
|
);
|
|
|
- return "Error: account $accountName could not unlocked";
|
|
|
+ return "Error: account " . $params['username'] . " could not unlocked";
|
|
|
}
|
|
|
return 'success';
|
|
|
}
|