function hosting_import_client in Hosting 5
Same name and namespace in other branches
- 6.2 client/hosting_client.module \hosting_import_client()
- 7.4 client/hosting_client.module \hosting_import_client()
- 7.3 client/hosting_client.module \hosting_import_client()
Helper function to generate new client node during import
Parameters
email: Client email address - Required
contact_name: Client contact name - Optional
existing: Return an existing client registered for this email address, defaults to FALSE
Return value
The nid of the generated client
1 call to hosting_import_client()
- hosting_import_site in site/
hosting_site.module - Helper function to generate new site node during import
File
- client/
hosting_client.module, line 398
Code
function hosting_import_client($email, $name = '', $organization = '') {
$client = hosting_get_client_by_email($email);
if (!$client) {
$client = new stdClass();
$client->type = 'client';
$client->email = $email;
$client->client_name = trim($name);
$client->organization = $organization;
$client->status = 1;
node_save($client);
}
return $client;
}