|
@@ -33,46 +33,26 @@ function zimbraSingleGetAccess()
|
|
|
->where('id', '=', $productID)
|
|
->where('id', '=', $productID)
|
|
|
->get();
|
|
->get();
|
|
|
$serverID = $serverIDObj[0]->server;
|
|
$serverID = $serverIDObj[0]->server;
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'zimbrasingle',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $params,
|
|
|
|
|
- "Error: could not get accessdata 1",
|
|
|
|
|
- $serverID
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
- } elseif($serverGroupID) {
|
|
|
|
|
|
|
+ } elseif($serverGroupID) {
|
|
|
$serverIDObj = Capsule::table('tblservergroupsrel')
|
|
$serverIDObj = Capsule::table('tblservergroupsrel')
|
|
|
->select('serverid')
|
|
->select('serverid')
|
|
|
->where('groupid', '=', $serverGroupID)
|
|
->where('groupid', '=', $serverGroupID)
|
|
|
->get();
|
|
->get();
|
|
|
$serverID = $serverIDObj[0]->serverid;
|
|
$serverID = $serverIDObj[0]->serverid;
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'zimbrasingle',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $params,
|
|
|
|
|
- "Error: could not get accessdata 2",
|
|
|
|
|
- $serverID
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
} elseif($packageid) {
|
|
} elseif($packageid) {
|
|
|
$serverIDObj = Capsule::table('tblhosting')
|
|
$serverIDObj = Capsule::table('tblhosting')
|
|
|
->select('server')
|
|
->select('server')
|
|
|
->where('packageid', '=', $packageid)
|
|
->where('packageid', '=', $packageid)
|
|
|
->get();
|
|
->get();
|
|
|
$serverID = $serverIDObj[0]->server;
|
|
$serverID = $serverIDObj[0]->server;
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'zimbrasingle',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $params,
|
|
|
|
|
- "Error: could not get accessdata 3",
|
|
|
|
|
- $serverID
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'zimbrasingle',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $params,
|
|
|
|
|
+ "Error: could not get accessdata 3",
|
|
|
|
|
+ ""
|
|
|
|
|
+ );
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
$server = Capsule::table('tblservers')
|
|
$server = Capsule::table('tblservers')
|
|
@@ -101,7 +81,6 @@ function zimbraSingleDoesEMailExist($emailNameOnly, $domainName)
|
|
|
{
|
|
{
|
|
|
$account_name = $emailNameOnly . "@" . $domainName;
|
|
$account_name = $emailNameOnly . "@" . $domainName;
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|
|
@@ -137,7 +116,6 @@ function zimbraSingleCreateAccount($userData)
|
|
|
$userData['password'] = $passDecrypt['password'];
|
|
$userData['password'] = $passDecrypt['password'];
|
|
|
}
|
|
}
|
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|
|
@@ -216,7 +194,6 @@ function zimbraSingleUnsuspendAccount($userData)
|
|
|
{
|
|
{
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|
|
@@ -250,15 +227,6 @@ function zimbraSingleDeleteAccount($userData)
|
|
|
{
|
|
{
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
$accountName = $userData['username'] . '@' . $userData['maildomain'];
|
|
$accountName = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'zimbrasingle',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $params,
|
|
|
|
|
- "debug: accountName",
|
|
|
|
|
- $account_name
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|
|
@@ -340,7 +308,6 @@ function zimbraSingleChangePassword($userData) {
|
|
|
function zimbraSingleChangePackage($userData) {
|
|
function zimbraSingleChangePackage($userData) {
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|
|
@@ -372,7 +339,6 @@ function zimbraSingleClientArea($userData)
|
|
|
{
|
|
{
|
|
|
$accessData = zimbraSingleGetAccess();
|
|
$accessData = zimbraSingleGetAccess();
|
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
$account_name = $userData['username'] . '@' . $userData['maildomain'];
|
|
|
-
|
|
|
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
$api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
$login = $api->login();
|
|
$login = $api->login();
|
|
|
if(is_a($login, "Exception")) {
|
|
if(is_a($login, "Exception")) {
|