From c92e416d7e47f1e5ee705d47f41f6fec3269bed1 Mon Sep 17 00:00:00 2001 From: Torsten Date: Mon, 30 Jun 2025 08:13:53 +0200 Subject: [PATCH] Dont register users with more than 4 uppercase characters --- pfosten/app/Http/Controllers/Auth/RegisterController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pfosten/app/Http/Controllers/Auth/RegisterController.php b/pfosten/app/Http/Controllers/Auth/RegisterController.php index f77265ab..404a4596 100644 --- a/pfosten/app/Http/Controllers/Auth/RegisterController.php +++ b/pfosten/app/Http/Controllers/Auth/RegisterController.php @@ -62,6 +62,12 @@ class RegisterController extends Controller */ protected function create(array $data) { + if (preg_match_all('/[A-Z]/', $data['name']) > 4) { + // The string contains more than 4 uppercase characters + // echo "More than 4 uppercase letters found."; + return; + } + return User::create([ 'name' => $data['name'], 'email' => $data['email'],