Skip to content

Commit 30bdd31

Browse files
authored
[1.x] Use available $name property from SessionGuard if the value (#553)
exists Introduced in Laravel Framwork 10.0.0: laravel/framework#43163 Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 04078fb commit 30bdd31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Actions/AttemptToAuthenticate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function throwFailedAuthenticationException($request)
107107
*/
108108
protected function fireFailedEvent($request)
109109
{
110-
event(new Failed(config('fortify.guard'), null, [
110+
event(new Failed($this->guard?->name ?? config('fortify.guard'), null, [
111111
Fortify::username() => $request->{Fortify::username()},
112112
'password' => $request->password,
113113
]));

src/Actions/RedirectIfTwoFactorAuthenticatable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function throwFailedAuthenticationException($request)
123123
*/
124124
protected function fireFailedEvent($request, $user = null)
125125
{
126-
event(new Failed(config('fortify.guard'), $user, [
126+
event(new Failed($this->guard?->name ?? config('fortify.guard'), $user, [
127127
Fortify::username() => $request->{Fortify::username()},
128128
'password' => $request->password,
129129
]));

0 commit comments

Comments
 (0)