diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 044cb1e88c..2c8d642963 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -254,7 +254,7 @@ class CompanySettings extends BaseSettings public $portal_custom_footer = ''; //@TODO @BEN public $portal_custom_js = ''; //@TODO @BEN - public $client_can_register = false; //@implemented + public $client_can_register = false; //@deorecated 04/06/2021 public $client_portal_terms = ''; //@TODO @BEN public $client_portal_privacy_policy = ''; //@TODO @BEN public $client_portal_enable_uploads = false; //@implemented diff --git a/app/Http/Middleware/ContactRegister.php b/app/Http/Middleware/ContactRegister.php index 640ef0f1c7..116dfe22d4 100644 --- a/app/Http/Middleware/ContactRegister.php +++ b/app/Http/Middleware/ContactRegister.php @@ -33,7 +33,7 @@ class ContactRegister if($company) { - abort_unless($company->getSetting('enable_client_registration'), 404); + abort_unless($company->client_can_register, 404); $request->merge(['key' => $company->company_key]); @@ -49,7 +49,7 @@ class ContactRegister if($company = Company::where($query)->first()) { - abort_unless($company->getSetting('enable_client_registration'), 404); + abort_unless($company->client_can_register, 404); $request->merge(['key' => $company->company_key]);