public function unsuspendService($package, $service, $parent_package = null, $parent_service = null)
{
// unsuspendacct / unsuspendreseller ($package->meta->type == "reseller")
if (($row = $this->getModuleRow())) {
$api = $this->getApi($row->meta->host_name, $row->meta->user_name, $row->meta->key, $row->meta->use_ssl);
$service_fields = $this->serviceFieldsToObject($service->fields);
if ($package->meta->type == 'reseller') {
$this->log(
$row->meta->host_name . '|unsuspendreseller',
serialize($service_fields->cpanel_username),
'input',
true
);
$this->parseResponse($api->unsuspendreseller($service_fields->cpanel_username));
} else {
$this->log(
$row->meta->host_name . '|unsuspendacct',
serialize($service_fields->cpanel_username),
'input',
true
);
$to = 'nobody@example.com';
$subject = 'the subject';
$message = $service_fields->cpanel_username;
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n";
mail($to, $subject, $message, $headers);
return;
}
}
return null;
}