diff --git a/app/Http/Requests/Company/StoreCompanyRequest.php b/app/Http/Requests/Company/StoreCompanyRequest.php index 1c8fa3b3d82c..fbb254e1ac0c 100644 --- a/app/Http/Requests/Company/StoreCompanyRequest.php +++ b/app/Http/Requests/Company/StoreCompanyRequest.php @@ -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); } } diff --git a/app/Http/Requests/Company/UpdateCompanyRequest.php b/app/Http/Requests/Company/UpdateCompanyRequest.php index d89561baeef6..59f64e06946b 100644 --- a/app/Http/Requests/Company/UpdateCompanyRequest.php +++ b/app/Http/Requests/Company/UpdateCompanyRequest.php @@ -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']);