|
|
@@ -274,7 +274,6 @@ function zimbraSingleChangePassword($userData) {
|
|
|
return $checkPW;
|
|
|
}
|
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
|
@@ -286,22 +285,20 @@ function zimbraSingleChangePassword($userData) {
|
|
|
""
|
|
|
);
|
|
|
return false;
|
|
|
- } else {
|
|
|
- $apiAccountManager = new Zm_Account($api);
|
|
|
- $response = $apiAccountManager->setAccountPassword($account_name, $userData['password']);
|
|
|
- if(is_a($response, "Exception")) {
|
|
|
- logModuleCall(
|
|
|
- 'zimbrasingle',
|
|
|
- __FUNCTION__,
|
|
|
- $params,
|
|
|
- "Error : password for $account_name could not be set",
|
|
|
- ""
|
|
|
- );
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- return $response;
|
|
|
- }
|
|
|
}
|
|
|
+ $apiAccountManager = new Zm_Account($api);
|
|
|
+ $response = $apiAccountManager->setAccountPassword($account_name, $userData['password']);
|
|
|
+ if(is_a($response, "Exception")) {
|
|
|
+ logModuleCall(
|
|
|
+ 'zimbrasingle',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ "Error : password for $account_name could not be set",
|
|
|
+ ""
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return 'success';
|
|
|
}
|
|
|
|
|
|
function zimbraSingleChangePackage($userData) {
|