Skip to content

Commit 9c5c3a7

Browse files
committed
Löschen von Servern #9
1 parent 6e031c7 commit 9c5c3a7

File tree

8 files changed

+9
-14
lines changed

8 files changed

+9
-14
lines changed

Diff for: lendserver.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: modules/addons/easywi/easywi.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: modules/addons/easywi/hooks.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: modules/addons/easywi/inc/easywi.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,9 @@ public function removeUser ($vars) {
666666
$responseRaw = $this->apiCall($this->apiUserCrud("del", $vars));
667667

668668
} else {
669+
670+
logActivity("Remove users was configured as '{$this->removeUsers}' user will only be deactivated.");
671+
669672
$vars = $this->localClientDetails($vars["userid"]);
670673
$vars["status"] = "Inactive";
671674

@@ -675,14 +678,11 @@ public function removeUser ($vars) {
675678
$response = @simplexml_load_string($responseRaw);
676679

677680
$this->addLogentry($vars, $response, $responseRaw);
681+
678682
} else {
679683
logActivity("User sync is maintained as {$userSync}. User removal/inactive state will not be send to Easy-Wi");
680684
}
681685

682-
if ($this->removeUsers != "Yes" || $userSync != "Y") {
683-
$this->addLogentry(array("action" => "delete", "userSync" => $userSync, "syncUsers" => $this->syncUsers));
684-
}
685-
686686
$this->deleteUserSyncEntry($vars["userid"]);
687687

688688
return (isset($response) && $response->errors != "") ? $response->errors: true;
@@ -2049,18 +2049,20 @@ private function orderInternalProcess ($vars, $hookAction = false) {
20492049

20502050
$leftOrders = $this->getRelevantOrderCount($userID, $serviceID);
20512051

2052-
if ($leftOrders == 0) {
2052+
if ($leftOrders == 0 && $this->removeUsers == "Yes") {
20532053
return $this->removeUser($this->localClientDetails($userID));
2054+
}
2055+
2056+
if ($leftOrders == 0) {
2057+
$this->removeUser($this->localClientDetails($userID));
20542058
} else {
20552059
logActivity("{$leftOrders} order(s) left. User with ID {$userID} will not be removed from Easy-Wi after service ID {$serviceID} is gone.");
20562060
}
20572061
}
20582062

2059-
20602063
if ($action == "del" || ($userSynced && ($action == "add" || $action == "mod"))) {
20612064

20622065
$options = $this->configOptionsOverwrite($vars);
2063-
#logActivity("Options:".json_encode($options));
20642066

20652067
# allowed list is "Game server,Voice server,TSDNS,Webspace,MySQL"
20662068
if (isset($options["type"]) and in_array($options["type"], array("Game server", "Voice server", "TSDNS", "Webspace", "MySQL"))) {

Diff for: modules/addons/easywi/lang/english.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: modules/addons/easywi/lang/german.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: modules/servers/easywi/easywi.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

Diff for: protectioncheck.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* @author Ulrich Block <[email protected]>
88
* @copyright Copyright (c) Ulrich Block
99
* @license http://www.gnu.org/licenses/gpl-3.0
10-
* @version 1.9
1110
* @link https://www.easy-wi.com.com/
1211
*
1312
* The Easy-WI WHMCS addon is free software: you can redistribute it and/or modify

0 commit comments

Comments
 (0)