You are here

function hosting_site_post_hosting_verify_task in Hostmaster (Aegir) 6

File

modules/hosting/site/hosting_site.drush.inc, line 196

Code

function hosting_site_post_hosting_verify_task($task, $data) {
  if ($task->ref->type == 'site') {
    $task->ref->verified = time();
    $task->ref->no_verify = TRUE;
    $task->ref->ip_addresses = array_values($data['context']['site_ip_addresses']);
    if ($data['context']['cron_key']) {
      $task->ref->cron_key = $data['context']['cron_key'];
    }
    node_save($task->ref);
    $context = $data['context'];
    $packages = $context['packages'];
    hosting_package_sync($packages);
    hosting_package_instance_sync($task->ref->nid, $packages);
  }
}