/** * Add a new nichandle reference */ public static function setNicHandle($domain_id, $profile_id, $type = "owner") { try { if (!empty($profile_id) && is_numeric($profile_id)) { $nicHandle = new DomainsNichandle(); $nicHandle->domain_id = $domain_id; $nicHandle->profile_id = $profile_id; $nicHandle->type = $type; if ($nicHandle->trySave()) { return true; } } return false; } catch (Exception $e) { return $e->getMessage(); } }