You are here

function hosting_import_client in Hosting 6.2

Same name and namespace in other branches
  1. 5 client/hosting_client.module \hosting_import_client()
  2. 7.4 client/hosting_client.module \hosting_import_client()
  3. 7.3 client/hosting_client.module \hosting_import_client()

Helper function to generate new client node during import.

Parameters

$name: Client name.

Return value

The nid of the generated client.

2 calls to hosting_import_client()
hosting_import_site in site/hosting_site.module
Helper function to generate update a site node during import.
hosting_site_drush_context_import in site/hosting_site.drush.inc

File

client/hosting_client.module, line 553

Code

function hosting_import_client($name) {
  $client = hosting_get_client_by_uname($name);
  if (!$client) {
    $client = new stdClass();
    $client->type = 'client';
    $client->uid = 1;
    $client->title = trim($name);
    $client->status = 1;
    node_save($client);
  }
  return $client;
}