1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for custom client portal subdomains

This commit is contained in:
David Bomba 2022-11-24 09:33:25 +11:00
parent ad853569da
commit 891c742c5d
2 changed files with 3 additions and 3 deletions

View File

@ -74,9 +74,9 @@ class UpdateCompanyRequest extends Request
$input = $this->all();
if (Ninja::isHosted() && array_key_exists('portal_domain', $input) && strlen($input['portal_domain']) > 1) {
if (array_key_exists('portal_domain', $input) && strlen($input['portal_domain']) > 1) {
$input['portal_domain'] = $this->addScheme($input['portal_domain']);
$input['portal_domain'] = strtolower($input['portal_domain']);
$input['portal_domain'] = rtrim(strtolower($input['portal_domain']), "/");
}
if (array_key_exists('settings', $input)) {

View File

@ -95,7 +95,7 @@ trait Inviteable
if (Ninja::isHosted()) {
$domain = $this->company->domain();
} else {
$domain = config('ninja.app_url');
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url');
}
switch ($this->company->portal_mode) {