Working on white label renewal

This commit is contained in:
Hillel Coren 2016-12-28 20:50:21 +02:00
parent d6b0827eac
commit 44785d5a75

View File

@ -275,7 +275,12 @@ class Client extends EntityModel
} else {
$contact = Contact::createNew();
$contact->send_invoice = true;
$contact->contact_key = isset($data['contact_key']) ? $data['contact_key'] : str_random(RANDOM_KEY_LENGTH);
if (isset($data['contact_key']) && $this->account->account_key == env('NINJA_LICENSE_ACCOUNT_KEY')) {
$contact->contact_key = $data['contact_key'];
} else {
$contact->contact_key = str_random(RANDOM_KEY_LENGTH);
}
}
if (Utils::hasFeature(FEATURE_CLIENT_PORTAL_PASSWORD) && $this->account->enable_portal_password){