diff --git a/app/Http/Requests/SaveUserRequest.php b/app/Http/Requests/SaveUserRequest.php index b6e44c3f44..98e561549e 100644 --- a/app/Http/Requests/SaveUserRequest.php +++ b/app/Http/Requests/SaveUserRequest.php @@ -39,14 +39,12 @@ class SaveUserRequest extends FormRequest // Brand new user case 'POST': - { $rules['first_name'] = 'required|string|min:1'; $rules['username'] = 'required_unless:ldap_import,1|string|min:1'; if ($this->request->get('ldap_import') == false) { $rules['password'] = Setting::passwordComplexityRulesSaving('store').'|confirmed'; } break; - } // Save all fields case 'PUT': @@ -57,12 +55,11 @@ class SaveUserRequest extends FormRequest // Save only what's passed case 'PATCH': - { $rules['password'] = Setting::passwordComplexityRulesSaving('update'); break; - } - default:break; + default: + break; } return $rules;