Skip to content

Commit 40c3b13

Browse files
committed
field1 handlign fixs
1 parent 7f3039a commit 40c3b13

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Plugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function_requirements('whm_api');
6565
'maxlst' => 0,
6666
'maxsub' => 'unlimited',
6767
);
68-
if ($event['field1'] == 'reseller')
68+
if (in_array('reseller', explode(',', $event['field1'])))
6969
$reseller = TRUE;
7070
else
7171
$reseller = FALSE;
@@ -306,7 +306,7 @@ function_requirements('whm_api');
306306
$whm->set_user($user);
307307
$whm->set_hash($hash);
308308
//$whm = whm_api('faith.interserver.net');
309-
if (in_array('reseller', $event['field1']))
309+
if (in_array('reseller', explode(',', $event['field1'])))
310310
$response = json_decode($whm->suspendreseller($serviceClass->getUsername(), 'Canceled Service'), true);
311311
else
312312
$response = json_decode($whm->suspendacct($serviceClass->getUsername(), 'Canceled Service'), true);
@@ -335,7 +335,7 @@ function_requirements('whm_api');
335335
$whm->set_hash($hash);
336336
//$whm = whm_api('faith.interserver.net');
337337
if (trim($serviceClass->getUsername()) != '') {
338-
if (in_array('reseller', $event['field1']))
338+
if (in_array('reseller', explode(',', $event['field1'])))
339339
$response = json_decode($whm->terminatereseller($serviceClass->getUsername(), true));
340340
else
341341
$response = json_decode($whm->removeacct($serviceClass->getUsername(), false));

0 commit comments

Comments
 (0)