Set portal domain to lower case

This commit is contained in:
David Bomba 2021-12-01 11:09:22 +11:00
parent 4d8ef04247
commit cd269883f3
2 changed files with 6 additions and 1 deletions

View File

@ -81,6 +81,9 @@ class StoreCompanyRequest extends Request
}
}
if(array_key_exists('portal_domain', $input))
$input['portal_domain'] = strtolower($input['portal_domain']);
$this->replace($input);
}
}

View File

@ -68,8 +68,10 @@ class UpdateCompanyRequest extends Request
{
$input = $this->all();
if(Ninja::isHosted() && array_key_exists('portal_domain', $input) && strlen($input['portal_domain']) > 1)
if(Ninja::isHosted() && 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']);
}
if (array_key_exists('settings', $input)) {
$input['settings'] = $this->filterSaveableSettings($input['settings']);