Skip to content

Commit 20e97bd

Browse files
committed
fix for directadmin
1 parent 1dfd9c6 commit 20e97bd

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/directadmin.inc.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,15 @@ function activate_directadmin($ipAddress, $ostype, $pass, $email, $name, $domain
304304
*/
305305
function deactivate_directadmin($ipAddress)
306306
{
307-
$license = get_directadmin_license_by_ip($ipAddress);
307+
$response = get_directadmin_licenses();
308+
foreach ($response as $idx => $data) {
309+
if ($data['ip'] == $ipAddress) {
310+
$license = $data;
311+
}
312+
}
313+
if (!isset($license)) {
314+
$license = get_directadmin_license_by_ip($ipAddress);
315+
}
308316
if ($license['active'] == 'Y') {
309317
$url = 'https://www.directadmin.com/cgi-bin/deletelicense';
310318
$post = [

0 commit comments

Comments
 (0)