From 8780fa0a26b0c3e4b103997b94f7ee442a797c15 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 29 Jun 2021 07:46:39 -0700 Subject: [PATCH] Use correct auth failure message Signed-off-by: snipe --- app/Http/Livewire/LoginForm.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Http/Livewire/LoginForm.php b/app/Http/Livewire/LoginForm.php index 78b73f9468..d1b196111e 100644 --- a/app/Http/Livewire/LoginForm.php +++ b/app/Http/Livewire/LoginForm.php @@ -55,11 +55,17 @@ class LoginForm extends Component $validatedData = $this->validate(); - if (\Auth::attempt(array('username' => $this->username, 'password' => $this->password))){ + if (\Auth::attempt( + [ + 'username' => $this->username, + 'password' => $this->password + ] + )) + { redirect()->route('dashboard'); } else { - session()->flash('error', 'email and password are wrong.'); - } + session()->flash('error', trans('auth/message.account_not_found')); + } }