From 4fc832838b0b06920964c2885749f977e4d508ee Mon Sep 17 00:00:00 2001 From: Jakob Schrettenbrunner Date: Thu, 16 Feb 2017 20:45:36 +0100 Subject: [PATCH] =?UTF-8?q?use=20=E2=80=9Arequired|string=E2=80=98=20to=20?= =?UTF-8?q?validate=20usernames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Auth/LoginController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 42f40fb00..d4d8c89c3 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -87,11 +87,11 @@ class LoginController extends Controller */ public function login(Request $request) { - // Check wether login is an email address or a username + // Check wether the user identifier is an email address or a username $isEmail = str_contains($request->input('user'), '@'); $this->validate($request, [ - 'user' => $isEmail ? 'required|email' : 'required', + 'user' => $isEmail ? 'required|email' : 'required|string', 'password' => 'required', ]);